wifi: wcn36xx: Convert to platform remove callback returning void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 17 Nov 2023 09:31:01 +0000 (10:31 +0100)
committerKalle Valo <quic_kvalo@quicinc.com>
Fri, 1 Dec 2023 16:06:37 +0000 (18:06 +0200)
commit8cc18a70913fcdc8ac06796ca91304df0a51b6b5
tree30b8a24711772207ab617f8bd0efffc1c1e3516b
parentb5418d170b7cf9af89245319935cfe7bf45a151c
wifi: wcn36xx: 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-12-u.kleine-koenig@pengutronix.de
drivers/net/wireless/ath/wcn36xx/main.c