Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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);