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>
1 parent 44e5223 commit dac73d73d13c2100c42dc40e6568d72a027133de
@Michael Tretter Michael Tretter authored on 14 Apr 2020
Sascha Hauer committed on 14 Apr 2020
Showing 1 changed file
View
drivers/of/resolver.c