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

Commit 549753d0 authored by Pantelis Antoniou's avatar Pantelis Antoniou Committed by Alistair Strachan
Browse files

UPSTREAM: of/overlay: Do not generate duplicate nodes



During the course of the rewrites a bug sneaked in when dealing
with children nodes of overlays, which ends up duplicating
sub nodes.

Simply remove the duplicate traversal of child nodes to fix.

Signed-off-by: default avatarPantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
(cherry picked from commit 3e7f7626fd49a9ffba8520a1a073f62929acad63)
Bug: 109890997
Change-Id: I8f444fa6a2027fb76ad095e70a1313c5e89e86ba
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
parent 1564034e
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -114,17 +114,6 @@ static int of_overlay_apply_single_device_node(struct of_overlay *ov,
		ret = of_overlay_apply_one(ov, tchild, child);
		if (ret)
			return ret;

		/* The properties are already copied, now do the child nodes */
		for_each_child_of_node(child, grandchild) {
			ret = of_overlay_apply_single_device_node(ov, tchild, grandchild);
			if (ret) {
				pr_err("%s: Failed to apply single node @%s/%s\n",
					__func__, tchild->full_name,
					grandchild->name);
				return ret;
			}
		}
	}

	return ret;