aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-06-07 18:33:46 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-06-07 18:33:46 +0300
commit05989b29c70690ff3766ba8323f648f3cf03440c (patch)
tree2bfa8fafd84dfa409f1e4337a20441ab33f8766b /common
parent39cfba8ad24982ae4c8e26826d90bc024edd7430 (diff)
downloadkmi-05989b29c70690ff3766ba8323f648f3cf03440c.tar.gz
kmi-05989b29c70690ff3766ba8323f648f3cf03440c.zip
fix root node get_reginfo
Diffstat (limited to 'common')
-rw-r--r--common/fdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/fdt.c b/common/fdt.c
index 356c669..3f20d72 100644
--- a/common/fdt.c
+++ b/common/fdt.c
@@ -22,7 +22,7 @@ struct cell_info get_reginfo(const void *fdt, const char *path)
return (struct cell_info){ 0, 0 };
size_t baselen = i - path;
- if (i == 0)
+ if (baselen == 0)
/* root node */
baselen = 1;