pinctrl: ocelot: add missing destroy_workqueue() in error path in ocelot_pinctrl_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Sun, 25 Sep 2022 02:12:58 +0000 (10:12 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:02 +0000 (13:32 +0100)
commite02b42f3fc56c67c6f81caea6911f83f18ccb4d4
tree02ce43850cabf03b523cde6b4dbda2ced64bc63e
parent55442d2f2cfaa1f1ded9fcb029a112a8136a6612
pinctrl: ocelot: add missing destroy_workqueue() in error path in ocelot_pinctrl_probe()

[ Upstream commit 8ada020ade3bc4125b639a1dca50a6df687dd986 ]

Using devm_add_action_or_reset() to make workqueue device-managed, so it can be
destroy whenever the driver is unbound.

Fixes: c297561bc98a ("pinctrl: ocelot: Fix interrupt controller")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Link: https://lore.kernel.org/r/20220925021258.1492905-1-yangyingliang@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pinctrl/pinctrl-ocelot.c