]> git.baikalelectronics.ru Git - kernel.git/commit
mfd: fsl-imx25: Fix an error handling path in mx25_tsadc_setup_irq()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 31 Jul 2022 12:06:23 +0000 (14:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:22:41 +0000 (13:22 +0200)
commitd76aa33b4e76f99a0304bbac1d4091be647e6af9
treedda8ca7f60067bee7bf8199868f3f7453344f30d
parent02d019dbbbbfb5546b361bbf738dca99781912e4
mfd: fsl-imx25: Fix an error handling path in mx25_tsadc_setup_irq()

[ Upstream commit 9c91ee9a5117299793805e3e602c47c8dfad679a ]

If devm_of_platform_populate() fails, some resources need to be
released.

Introduce a mx25_tsadc_unset_irq() function that undoes
mx25_tsadc_setup_irq() and call it both from the new error handling path
of the probe and in the remove function.

Fixes: 11d06f5c85ae ("mfd: fsl-imx25: Use devm_of_platform_populate()")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/d404e04828fc06bcfddf81f9f3e9b4babbe35415.1659269156.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mfd/fsl-imx25-tsadc.c