[PATCH] nvmem: lpc18xx_eeprom: Convert to platform remove callback returning void

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Fri Apr 12 05:31:15 PDT 2024


Hello,

On Fri, Mar 08, 2024 at 09:51:11AM +0100, Uwe Kleine-König 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 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 at pengutronix.de>

gentle ping. This patch got an ack, but it seems it wasn't picked up
yet (or criticised). Would be great if it made it into v6.10-rc1 as I
want to change the prototype of struct platform_driver::remove() in the
merge window following v6.10.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20240412/c3e5d13e/attachment.sig>


More information about the linux-arm-kernel mailing list