of: Make sure attached nodes don't carry along extra children
authorGrant Likely <grant.likely@linaro.org>
Wed, 16 Jul 2014 14:48:46 +0000 (08:48 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 16 Feb 2015 05:50:43 +0000 (14:50 +0900)
commit12f293f2295806bef40190774182c346a6429df3
tree60673126b47d9eb887add508b456cf1f0087d4be
parent952f9f440c9acd809fad416606ec5d722e168820
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>
drivers/of/dynamic.c