提交 6162dbe4 编写于 作者: G Grant Likely

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: NGrant Likely <grant.likely@linaro.org>
上级 8a2b22a2
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册