]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvdimm/e820: Convert to platform remove callback returning void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 10 Apr 2024 13:47:33 +0000 (15:47 +0200)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 27 May 2024 08:13:55 +0000 (10:13 +0200)
commit521558275731c040136ebdd6dfc84864ce9d9a96
tree0c7ba3806102f2972f765285778626834a1052ff
parent4402a5aa9732d870753ba7b945c812d9bd64f1c9
nvdimm/e820: 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.

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/fcb5545d45cf31caee31e0c66ed3521ead12c9b4.1712756722.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
drivers/nvdimm/e820.c