serial: sc16is7xx: Make sc16is7xx_remove() return void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 12 Oct 2021 15:39:43 +0000 (17:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Oct 2021 12:34:07 +0000 (14:34 +0200)
Up to now sc16is7xx_remove() returns zero unconditionally. Make it
return void instead which makes it easier to see in the callers that
there is no error to handle.

Also the return value of spi remove callbacks is ignored anyway.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20211012153945.2651412-19-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sc16is7xx.c

index acbb615dd28fd1fc1ac1d0792ea1462cbbc515aa..64e7e6c8145f8a6ae114ada0c1017b1499db9db4 100644 (file)
@@ -1365,7 +1365,7 @@ out_clk:
        return ret;
 }
 
-static int sc16is7xx_remove(struct device *dev)
+static void sc16is7xx_remove(struct device *dev)
 {
        struct sc16is7xx_port *s = dev_get_drvdata(dev);
        int i;
@@ -1385,8 +1385,6 @@ static int sc16is7xx_remove(struct device *dev)
        kthread_stop(s->kworker_task);
 
        clk_disable_unprepare(s->clk);
-
-       return 0;
 }
 
 static const struct of_device_id __maybe_unused sc16is7xx_dt_ids[] = {
@@ -1444,7 +1442,9 @@ static int sc16is7xx_spi_probe(struct spi_device *spi)
 
 static int sc16is7xx_spi_remove(struct spi_device *spi)
 {
-       return sc16is7xx_remove(&spi->dev);
+       sc16is7xx_remove(&spi->dev);
+
+       return 0;
 }
 
 static const struct spi_device_id sc16is7xx_spi_id_table[] = {
@@ -1497,7 +1497,9 @@ static int sc16is7xx_i2c_probe(struct i2c_client *i2c,
 
 static int sc16is7xx_i2c_remove(struct i2c_client *client)
 {
-       return sc16is7xx_remove(&client->dev);
+       sc16is7xx_remove(&client->dev);
+
+       return 0;
 }
 
 static const struct i2c_device_id sc16is7xx_i2c_id_table[] = {