extcon: max3355: Convert to platform remove callback returning void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sun, 25 Feb 2024 15:54:53 +0000 (16:54 +0100)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 8 May 2024 16:03:38 +0000 (01:03 +0900)
commitba6985eac33f510bf850210cb7c2b75492104919
tree3bf7e703d86b60df3fb18887fa8900c2790c56f3
parent6d472f20c3c00a6fe61fd97646ffc627a697c760
extcon: max3355: 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.

Link: https://lore.kernel.org/lkml/2c017ea490f721646bd472e7d427eb377e4e8423.1708876186.git.u.kleine-koenig@pengutronix.de/
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon-max3355.c