]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pps: clients: gpio: Convert to platform remove callback returning void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 8 Mar 2024 08:51:15 +0000 (09:51 +0100)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 27 May 2024 08:13:55 +0000 (10:13 +0200)
commit49fc3ffe9f7c239319f009ce3f5dd0cc5bfc64fa
treecaa4df3e83ca7a1eef0a1ba3b1e5701621943394
parent29f102dbb11fe1b2f4ea68e3a5721255f37f8bc6
pps: clients: gpio: Convert to platform remove callback returning void

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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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

Acked-by: Rodolfo Giometti <giometti@enneenne.com>
Link: https://lore.kernel.org/r/f4b9402af72e5f285c8b0f068076a76418f653f5.1709886922.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
drivers/pps/clients/pps-gpio.c