From 05989b29c70690ff3766ba8323f648f3cf03440c Mon Sep 17 00:00:00 2001 From: Kimplul Date: Wed, 7 Jun 2023 18:33:46 +0300 Subject: fix root node get_reginfo --- common/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') 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; -- cgit v1.3