From: Uwe Kleine-König Date: Wed, 25 Nov 2020 09:31:06 +0000 (+0100) Subject: siox: Make remove callback return void X-Git-Tag: v5.11-rc1~164^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1c12c27086dcef853832a7cbebcb48bdac8104b6;p=thirdparty%2Fkernel%2Flinux.git siox: Make remove callback return void The driver core ignores the return value of the remove callback, so don't give siox drivers the chance to provide a value. All siox drivers only allocate devm-managed resources in .probe, so there is no .remove callback to fix. Tested-by: Thorsten Scherer Acked-by: Thorsten Scherer Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20201125093106.240643-3-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/siox/siox-core.c b/drivers/siox/siox-core.c index b56cdcb529678..1794ff0106bc6 100644 --- a/drivers/siox/siox-core.c +++ b/drivers/siox/siox-core.c @@ -525,12 +525,11 @@ static int siox_remove(struct device *dev) struct siox_driver *sdriver = container_of(dev->driver, struct siox_driver, driver); struct siox_device *sdevice = to_siox_device(dev); - int ret = 0; if (sdriver->remove) - ret = sdriver->remove(sdevice); + sdriver->remove(sdevice); - return ret; + return 0; } static void siox_shutdown(struct device *dev) diff --git a/include/linux/siox.h b/include/linux/siox.h index da7225bf1877e..6bfbda3f634c2 100644 --- a/include/linux/siox.h +++ b/include/linux/siox.h @@ -36,7 +36,7 @@ bool siox_device_connected(struct siox_device *sdevice); struct siox_driver { int (*probe)(struct siox_device *sdevice); - int (*remove)(struct siox_device *sdevice); + void (*remove)(struct siox_device *sdevice); void (*shutdown)(struct siox_device *sdevice); /*