[PATCH v3] mtd: nand: Convert to platform remove callback returning void

Miquel Raynal miquel.raynal at bootlin.com
Tue Apr 11 06:43:04 PDT 2023


On Tue, 2023-04-11 at 11:38:16 UTC, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= wrote:
> 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 (mostly) ignored
> 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.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Acked-by: Tudor Ambarus <tudor.ambarus at linaro.org>
> Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com> # atmel
> Reviewed-by: Paul Cercueil <paul at crapouillou.net> # ingenic
> Reviewed-by: Philippe Mathieu-Daudé <philmd at linaro.org> # ingenic
> Acked-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com> # intel
> Reviewed-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com> # meson
> Acked-by: Roger Quadros <rogerq at kernel.org> # omap_elm
> Reviewed-by: Geert Uytterhoeven <geert+renesas at glider.be> # renesas
> Reviewed-by: Heiko Stuebner <heiko at sntech.de> # rockchip
> Acked-by: Jernej Skrabec <jernej.skrabec at gmail.com> # sunxi
> Acked-by: Thierry Reding <treding at nvidia.com> # tegra
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel



More information about the Linux-rockchip mailing list