counter: ti-ecap-capture: Convert to platform remove callback returning void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sun, 10 Mar 2024 08:06:06 +0000 (09:06 +0100)
committerWilliam Breathitt Gray <wbg@kernel.org>
Tue, 2 Apr 2024 17:10:34 +0000 (13:10 -0400)
commite9b4895fd171dfa961c570d31ef61f443b210ab1
treebd4cf07ff14714261f41e7faaab5054f759181f9
parentc90663596e7c97363d8855c635f39500ed2f0030
counter: ti-ecap-capture: 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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/f70902b2aabecaa9295c28629cd7a8a0e6eb06d0.1710057753.git.u.kleine-koenig@pengutronix.de
Signed-off-by: William Breathitt Gray <wbg@kernel.org>
drivers/counter/ti-ecap-capture.c