of: unittest: Convert to platform remove callback returning void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sun, 19 Mar 2023 10:06:20 +0000 (11:06 +0100)
committerRob Herring <robh@kernel.org>
Mon, 20 Mar 2023 19:59:08 +0000 (14:59 -0500)
commitc9c9d764daeeb264c647b0c6a3d2f602a7deb586
tree27c9fce386cb2c413998ae1148afa4f9c0635102
parent13cd9ac670df5e052d3a31ae21bb1787202870dd
of: unittest: 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230319100620.295849-4-u.kleine-koenig@pengutronix.de
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/unittest.c