svn commit: r277289 - head/sys/dev/ofw
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Sat Jan 17 07:01:52 UTC 2015
Author: nwhitehorn
Date: Sat Jan 17 07:01:51 2015
New Revision: 277289
URL: https://svnweb.freebsd.org/changeset/base/277289
Log:
Return an appropriate error code in the case of a missing property rather
than random numbers.
MFC after: 1 week
Modified:
head/sys/dev/ofw/ofw_fdt.c
Modified: head/sys/dev/ofw/ofw_fdt.c
==============================================================================
--- head/sys/dev/ofw/ofw_fdt.c Sat Jan 17 06:43:30 2015 (r277288)
+++ head/sys/dev/ofw/ofw_fdt.c Sat Jan 17 07:01:51 2015 (r277289)
@@ -238,6 +238,9 @@ ofw_fdt_getproplen(ofw_t ofw, phandle_t
return (sizeof(uint64_t)*2*fdt_num_mem_rsv(fdtp));
}
+ if (prop == NULL)
+ return (-1);
+
return (len);
}
More information about the svn-src-all
mailing list