of: use of_get_child_by_name() to find child node
After iterating the children of a node with for_each_child_of_node(), the child node will never be NULL. If the node was not found, overlay_child will always point to the first element in the list, which might or might not be the node that was searched. Use the of_get_child_by_name() helper function to find the child node with the name, which does the right thing and returns NULL if the node is not found. Reported-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> |
---|
|
drivers/of/resolver.c |
---|