# Re: \[PATCH net-next v2 6/9\] net: wan/ixp4xx\_hss: Convert to platform remove callback returning void

- From: Linus Walleij \<hidden\>
- Date: 2023-12-05 22:44:02 
- List: netdev
- Page: https://ratatoskr.run/netdev/2023/12/8841704
- Thread: https://ratatoskr.run/linux-arm-kernel/2023/12/8296305/t.md

```text
On Mon, Dec 4, 2023 at 7:31 PM Uwe Kleine-König
[ref] 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.
>
> Link: https://lore.kernel.org/r/20231117095922.876489-8-u.kleine-koenig@pengutronix.de
> Signed-off-by: Uwe Kleine-König <redacted>

Acked-by: Linus Walleij <redacted>

Yours,
Linus Walleij
```
