mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
Return an appropriate error code in the case of a missing property rather
than random numbers. MFC after: 1 week
This commit is contained in:
parent
e5acc52d45
commit
d2d3e9b818
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=277289
@ -238,6 +238,9 @@ ofw_fdt_getproplen(ofw_t ofw, phandle_t package, const char *propname)
|
||||
return (sizeof(uint64_t)*2*fdt_num_mem_rsv(fdtp));
|
||||
}
|
||||
|
||||
if (prop == NULL)
|
||||
return (-1);
|
||||
|
||||
return (len);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user