]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: zImage: atags_to_fdt: Fix node names on added root nodes
authorRob Herring <robh@kernel.org>
Tue, 26 Jan 2021 02:39:05 +0000 (20:39 -0600)
committerRob Herring <robh@kernel.org>
Wed, 27 Jan 2021 01:09:03 +0000 (19:09 -0600)
commit165595ab8f14c0af20c8ea46a387a49571d8267e
tree3540d4abe5588639a5e64d507af834cda4a9cf77
parent305154e9057adc741760170ef8d81b09657dbdc6
ARM: zImage: atags_to_fdt: Fix node names on added root nodes

Commit 76e0c3810c80 ("of/fdt: Remove redundant kbasename function
call") exposed a bug creating DT nodes in the ATAGS to DT fixup code.
Non-existent nodes would mistaken get created with a leading '/'. The
problem was fdt_path_offset() takes a full path while creating a node
with fdt_add_subnode() takes just the basename.

Since this we only add root child nodes, we can just skip over the '/'.

Fixes: 76e0c3810c80 ("of/fdt: Remove redundant kbasename function call")
Reported-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: Qi Zheng <arch0.zheng@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Rob Herring <robh@kernel.org>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20210126023905.1631161-1-robh@kernel.org
arch/arm/boot/compressed/atags_to_fdt.c