net: rfkill: gpio: Convert to platform remove callback returning void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 6 Mar 2024 18:35:38 +0000 (19:35 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 25 Mar 2024 14:40:22 +0000 (15:40 +0100)
commit597d817202b5af0e3a9ff40c5d0a21e4e2e06e00
tree87a7f831c080eaa3c42da8511222f6f03b7fd09a
parentf40db02e8fa357196d57e002cc1e74abe8b8009d
net: rfkill: 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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Link: https://msgid.link/20240306183538.88777-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/rfkill/rfkill-gpio.c