]> www.infradead.org Git - users/dwmw2/linux.git/commit
ata: pata_falcon: Convert to platform remove callback returning void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sun, 5 Nov 2023 15:00:38 +0000 (16:00 +0100)
committerDamien Le Moal <dlemoal@kernel.org>
Wed, 8 Nov 2023 00:00:44 +0000 (09:00 +0900)
commit47d4708dfa54ad0e84e47bc681c133c2146b0f56
treec42caad0e9029ce389fbb65edd2cb6601ea0e137
parent0b2771dd52570698c1b92e428f8bf2a224e7a2c3
ata: pata_falcon: 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: Sergey Shtylyov <s.shtylyov@omp.ru>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
drivers/ata/pata_falcon.c