mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
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: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
parent
87f242c119
commit
6d0f5470db
1 changed files with 4 additions and 4 deletions
|
@ -311,10 +311,10 @@ static int add_changeset_node(struct overlay_changeset *ovcs,
|
||||||
return build_changeset_next_level(ovcs, tchild, node, 0);
|
return build_changeset_next_level(ovcs, tchild, node, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node->phandle)
|
if (node->phandle && tchild->phandle)
|
||||||
return -EINVAL;
|
ret = -EINVAL;
|
||||||
|
else
|
||||||
ret = build_changeset_next_level(ovcs, tchild, node, 0);
|
ret = build_changeset_next_level(ovcs, tchild, node, 0);
|
||||||
of_node_put(tchild);
|
of_node_put(tchild);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Reference in a new issue