Skip to content
Commit 65cd4791 authored by Phil Elwell's avatar Phil Elwell
Browse files

of: overlay: Correct symbol path fixups



When symbols from overlays are added to the live tree their paths must
be rebased. The translated symbol is normally the result of joining
the fragment-relative path (with a leading "/") to the target path
(either copied directly from the "target-path" property or resolved
from the phandle). This translation fails when the target is the root
node (a common case for Raspberry Pi overlays) because the resulting
path starts with a double slash. For example, if target-path is "/" and
the fragment adds a node called "newnode", the label associated with
that node will be assigned the path "//newnode", which can't be found
in the tree.

Fix the failure case by explicitly replacing a target path of "/" with
an empty string.

Fixes: d1651b03 ("of: overlay: add overlay symbols to live device tree")

Signed-off-by: default avatarPhil Elwell <phil@raspberrypi.com>
parent 6567eca5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment