]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: zynqmp-gqspi: Convert to platform remove callback returning void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 3 Mar 2023 17:20:41 +0000 (18:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Oct 2023 19:59:04 +0000 (21:59 +0200)
commite514f897ad66560215f70cd3e343e43ee6dc4ca3
tree51dfdb7c44264cf59811d7a477e7db3453d89057
parent1edcec18cfb7195c33072594aa02a442801dcf57
spi: zynqmp-gqspi: Convert to platform remove callback returning void

[ Upstream commit 3ffefa1d9c9eba60c7f8b4a9ce2df3e4c7f4a88e ]

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230303172041.2103336-88-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 1527b076ae2c ("spi: zynqmp-gqspi: fix clock imbalance on probe failure")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-zynqmp-gqspi.c