wifi: ath5k: Convert to platform remove callback returning void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 17 Nov 2023 09:30:59 +0000 (10:30 +0100)
committerKalle Valo <quic_kvalo@quicinc.com>
Fri, 1 Dec 2023 16:06:37 +0000 (18:06 +0200)
commitb5418d170b7cf9af89245319935cfe7bf45a151c
treedd6b29d3f256cd2b9a56a93ef4537124e780f76e
parent940b57fd0e77109874a99de8b304d672599d1acb
wifi: ath5k: 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>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20231117093056.873834-10-u.kleine-koenig@pengutronix.de
drivers/net/wireless/ath/ath5k/ahb.c