diff options
author | Grant Likely <grant.likely@linaro.org> | 2014-07-16 08:48:46 -0600 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-02-16 14:50:43 +0900 |
commit | 12f293f2295806bef40190774182c346a6429df3 (patch) | |
tree | 60673126b47d9eb887add508b456cf1f0087d4be | |
parent | 952f9f440c9acd809fad416606ec5d722e168820 (diff) |
of: Make sure attached nodes don't carry along extra children
The child pointer does not get cleared when attaching new nodes which
could cause the tree to be inconsistent. Clear the child pointer in
__of_attach_node() to be absolutely sure that the structure remains in a
consistent layout.
Signed-off-by: Grant Likely <grant.likely@linaro.org>
(cherry picked from commit 6162dbe49a451f96431a23b4821f05e3bd925bc1)
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/of/dynamic.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c index c875787fa394..b96d83100987 100644 --- a/drivers/of/dynamic.c +++ b/drivers/of/dynamic.c @@ -98,6 +98,7 @@ int of_property_notify(int action, struct device_node *np, void __of_attach_node(struct device_node *np) { + np->child = NULL; np->sibling = np->parent->child; np->allnext = np->parent->allnext; np->parent->allnext = np; |