aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/compressed/atags_to_fdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/boot/compressed/atags_to_fdt.c')
-rw-r--r--arch/arm/boot/compressed/atags_to_fdt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/boot/compressed/atags_to_fdt.c b/arch/arm/boot/compressed/atags_to_fdt.c
index 8452753efebe..31927d2fe297 100644
--- a/arch/arm/boot/compressed/atags_to_fdt.c
+++ b/arch/arm/boot/compressed/atags_to_fdt.c
@@ -15,7 +15,8 @@ static int node_offset(void *fdt, const char *node_path)
{
int offset = fdt_path_offset(fdt, node_path);
if (offset == -FDT_ERR_NOTFOUND)
- offset = fdt_add_subnode(fdt, 0, node_path);
+ /* Add the node to root if not found, dropping the leading '/' */
+ offset = fdt_add_subnode(fdt, 0, node_path + 1);
return offset;
}