siox: Make remove callback return void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 25 Nov 2020 09:31:06 +0000 (10:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Dec 2020 15:17:15 +0000 (16:17 +0100)
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 <t.scherer@eckelmann.de>
Acked-by: Thorsten Scherer <t.scherer@eckelmann.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20201125093106.240643-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/siox/siox-core.c
include/linux/siox.h

index b56cdcb529678f0720afa7b5795f100b70cb5f4c..1794ff0106bc6df0e9a31dc87b6f2075e734044a 100644 (file)
@@ -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)
index da7225bf1877e2494688eb77cf4daf0ded6b789f..6bfbda3f634c2d7cb48fd057656e8e2c5b2d6f43 100644 (file)
@@ -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);
 
        /*