]> git.hungrycats.org Git - linux/commit
of/address: Don't loop forever in of_find_matching_node_by_address().
authorDavid Daney <david.daney@cavium.com>
Wed, 19 Aug 2015 20:17:47 +0000 (13:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Sep 2015 17:10:58 +0000 (10:10 -0700)
commitf41846b6ab0954079d9e656a1b69ac2d5c5cc69b
treec966f536ccb6b2f4462555761254306a09a1f070
parent0d9357e39a90f9287e4cc172e1713ff7ddf0cb39
of/address: Don't loop forever in of_find_matching_node_by_address().

commit 3a496b00b6f90c41bd21a410871dfc97d4f3c7ab upstream.

If the internal call to of_address_to_resource() fails, we end up
looping forever in of_find_matching_node_by_address().  This can be
caused by a defective device tree, or calling with an incorrect
matches argument.

Fix by calling of_find_matching_node() unconditionally at the end of
the loop.

Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/of/address.c