Commit 6d0f5470 authored by Frank Rowand's avatar Frank Rowand Committed by Rob Herring

of: overlay: loosen overly strict phandle clash check

When an overlay contains a node that already exists in
the live device tree, the overlay node is not allowed
to change the phandle of the existing node.

The existing check refused to allow an overlay node to
set the node phandle even when the existing node did
not have a phandle.  Relax the check to allow an
overlay node to set the phandle value if the existing
node does not have a phandle.
Signed-off-by: default avatarFrank Rowand <frank.rowand@sony.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 87f242c1
......@@ -311,9 +311,9 @@ static int add_changeset_node(struct overlay_changeset *ovcs,
return build_changeset_next_level(ovcs, tchild, node, 0);
}
if (node->phandle)
return -EINVAL;
if (node->phandle && tchild->phandle)
ret = -EINVAL;
else
ret = build_changeset_next_level(ovcs, tchild, node, 0);
of_node_put(tchild);
......
Markdown is supported
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