mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
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>
This commit is contained in:
parent
8a2b22a259
commit
6162dbe49a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user