An addendum: it is possible, though of questionable utility, for a node
to have no properties at all. Do the right thing in such cases.
This commit is contained in:
parent
0f3406e079
commit
c67919895d
@ -283,6 +283,8 @@ ofw_fdt_nextprop(ofw_t ofw, phandle_t package, const char *previous, char *buf,
|
||||
|
||||
/* Find the first prop in the node */
|
||||
offset = fdt_first_property_offset(fdtp, offset);
|
||||
if (offset < 0)
|
||||
return (0); /* No properties */
|
||||
|
||||
if (previous != NULL) {
|
||||
while (offset >= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user