pinctrl: core: Fix warning by removing bogus code
commit9c89b4cc991e4988e83b09c917bf025b3e51916d
authorTony Lindgren <tony@atomide.com>
Fri, 12 May 2017 15:47:57 +0000 (12 08:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Jul 2017 14:53:56 +0000 (12 16:53 +0200)
tree6a85c9f5ddda22184f738dd496abf26585bfff35
parent789aa0c0b2f1d16a5ec58c9f35a7376a5f8ad1b9
pinctrl: core: Fix warning by removing bogus code

commit 664b7c4728821767e0228ee161bab87db2be58f1 upstream.

Andre Przywara <andre.przywara@arm.com> noticed that we can get the
following warning with -EPROBE_DEFER:

"WARNING: CPU: 1 PID: 89 at drivers/base/dd.c:349
driver_probe_device+0x2ac/0x2e8"

Let's fix the issue by removing the indices as suggested by
Tejun Heo <tj@kernel.org>. All we have to do here is kill the radix
tree.

I probably ended up with the indices after grepping for removal
of all entries using radix_tree_for_each_slot() and the first
match found was gmap_radix_tree_free(). Anyways, no need for
indices here, and we can just do remove all the entries using
radix_tree_for_each_slot() along how the item_kill_tree() test
case does.

Fixes: c7059c5ac70a ("pinctrl: core: Add generic pinctrl functions for managing groups")
Fixes: a76edc89b100 ("pinctrl: core: Add generic pinctrl functions for managing groups")
Reported-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/core.c
drivers/pinctrl/pinmux.c