]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: core: Fix warning by removing bogus code
authorTony Lindgren <tony@atomide.com>
Fri, 12 May 2017 15:47:57 +0000 (08:47 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 22 May 2017 15:36:13 +0000 (17:36 +0200)
commit5f3f4a3463a7c40d8c73e4d856d27172ed35f670
tree8b8d6507cbdd45754772a91f4b612bd171ad6d4a
parentece06819fe6a25c22c91bfb8c86992cca2bf63d9
pinctrl: core: Fix warning by removing bogus code

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: 0e1bc394196d ("pinctrl: core: Add generic pinctrl functions for managing groups")
Fixes: 045ac00e1913 ("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>
drivers/pinctrl/core.c
drivers/pinctrl/pinmux.c