summaryrefslogtreecommitdiff
path: root/drivers/core/ofnode.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-08-08 21:38:05 -0400
committerTom Rini <trini@konsulko.com>2023-08-08 21:38:05 -0400
commit1e1437d9f8b5be362afdd0212dbae6c41f53f3d8 (patch)
tree7c22536424032112c0c5e3ddce45f0333478f355 /drivers/core/ofnode.c
parenta169438411f9277cc689c14078151aa1d1caae3c (diff)
parent70fdcc704a978acb4de5e891469825596c0d292e (diff)
Merge branch '2023-08-08-assorted-code-corrections' into next
- A number of code corrections caught by Smatch and a few others as well.
Diffstat (limited to 'drivers/core/ofnode.c')
-rw-r--r--drivers/core/ofnode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index 8df16e56af5..a4dc9bde085 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -103,7 +103,7 @@ void *ofnode_lookup_fdt(ofnode node)
if (gd->flags & GD_FLG_RELOC) {
uint i = OFTREE_TREE_ID(node.of_offset);
- if (i > oftree_count) {
+ if (i >= oftree_count) {
log_debug("Invalid tree ID %x\n", i);
return NULL;
}