]> git.baikalelectronics.ru Git - kernel.git/commit
spi: qup: Don't skip cleanup in remove's error path
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 30 Mar 2023 21:03:40 +0000 (23:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:35:47 +0000 (11:35 +0200)
commiteaa5c24269027ae54afbf138150b5d54b1863564
tree7f4948393b18e2375ec2a25a56fcd7172d62bc42
parent2b95e34ebdad24b4fa36bffa19733ed18fc90e42
spi: qup: Don't skip cleanup in remove's error path

[ Upstream commit 61f49171a43ab1f80c73c5c88c508770c461e0f2 ]

Returning early in a platform driver's remove callback is wrong. In this
case the dma resources are not released in the error path. this is never
retried later and so this is a permanent leak. To fix this, only skip
hardware disabling if waking the device fails.

Fixes: 23e0d4381876 ("spi: Add Qualcomm QUP SPI controller support")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230330210341.2459548-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-qup.c