Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118279
b: refs/heads/master
c: 2dccbf4
h: refs/heads/master
i:
  118277: 09ae73a
  118275: a36f038
  118271: 6035509
v: v3
  • Loading branch information
David Gibson authored and Paul Mackerras committed Oct 31, 2008
1 parent b2e0691 commit d88577e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 210434d7633d477aa503454d68511fa2904e418e
refs/heads/master: 2dccbf4ea05d2c3603b8c1359019bf7148a316a5
9 changes: 6 additions & 3 deletions trunk/arch/powerpc/boot/libfdt/fdt_ro.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ int fdt_subnode_offset_namelen(const void *fdt, int offset,

FDT_CHECK_HEADER(fdt);

for (depth = 0;
offset >= 0;
for (depth = 0, offset = fdt_next_node(fdt, offset, &depth);
(offset >= 0) && (depth > 0);
offset = fdt_next_node(fdt, offset, &depth)) {
if (depth < 0)
return -FDT_ERR_NOTFOUND;
Expand All @@ -114,7 +114,10 @@ int fdt_subnode_offset_namelen(const void *fdt, int offset,
return offset;
}

return offset; /* error */
if (offset < 0)
return offset; /* error */
else
return -FDT_ERR_NOTFOUND;
}

int fdt_subnode_offset(const void *fdt, int parentoffset,
Expand Down

0 comments on commit d88577e

Please sign in to comment.