diff options
Diffstat (limited to 'libfdt/fdt_ro.c')
-rw-r--r-- | libfdt/fdt_ro.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libfdt/fdt_ro.c b/libfdt/fdt_ro.c index 923c389ece9..ffd9209b193 100644 --- a/libfdt/fdt_ro.c +++ b/libfdt/fdt_ro.c @@ -283,6 +283,10 @@ int fdt_find_node_by_path(const void *fdt, const char *path) if (*path != '/') return -FDT_ERR_BADPATH; + /* Handle the root path: root offset is 0 */ + if (strcmp(path, "/") == 0) + return 0; + while (*p) { const char *q; |