]> git.itanic.dy.fi Git - linux-stable/commit
pinctrl: freescale: imx: Fix an error handling path in 'imx_pinctrl_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 30 May 2020 20:49:55 +0000 (22:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jun 2020 13:33:01 +0000 (15:33 +0200)
commit283bb2e42f76bb2164992526ad3ef22637124675
tree488bf7507c01b9160b66875e9a98dfc6392b18f3
parent18210a33c3103144178529cf32e86d4c0eec62c3
pinctrl: freescale: imx: Fix an error handling path in 'imx_pinctrl_probe()'

[ Upstream commit 11d8da5cabf7c6c3263ba2cd9c00260395867048 ]

'pinctrl_unregister()' should not be called to undo
'devm_pinctrl_register_and_init()', it is already handled by the framework.

This simplifies the error handling paths of the probe function.
The 'imx_free_resources()' can be removed as well.

Fixes: a51c158bf0f7 ("pinctrl: imx: use radix trees for groups and functions")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Link: https://lore.kernel.org/r/20200530204955.588962-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pinctrl/freescale/pinctrl-imx.c