[PATCH 00/20] mtd: Convert to platform remove callback returning void

Tudor Ambarus tudor.ambarus at linaro.org
Mon Oct 9 17:07:22 AEDT 2023

On 10/8/23 21:01, Uwe Kleine-König wrote:
> Hello,
> this series converts all platform drivers below drivers/mtd to use the
> .remove_new() callback. Compared to the traditional .remove() callback
> .remove_new() returns no value. This is a good thing because the driver
> core doesn't (and cannot) cope for errors during remove. The only effect
> of a non-zero return value in .remove() is that the driver core emits a
> warning. The device is removed anyhow and an early return from .remove()
> usually yields resource leaks and/or use-after-free bugs.
> All drivers touched here returned zero unconditionally in their remove
> callback, so they could all be converted trivially to .remove_new().
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.

Acked-by: Tudor Ambarus <tudor.ambarus at linaro.org>

More information about the Linuxppc-dev mailing list