1
0
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:
Nathan Whitehorn 2015-01-17 07:01:51 +00:00
parent e5acc52d45
commit d2d3e9b818
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=277289

View File

@ -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);
}