aboutsummaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorUwe Kleine-König2021-10-12 17:39:43 +0200
committerGreg Kroah-Hartman2021-10-13 14:34:07 +0200
commit9b29075c1a4595b1d4c41668be4c72553ff60b48 (patch)
tree96ec251cab24c00f8e79f24524e9414f470fd58a /drivers/tty
parent70b4d23226c85a30affd612a05c5898a724bcd62 (diff)
serial: sc16is7xx: Make sc16is7xx_remove() return void
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>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/sc16is7xx.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index acbb615dd28f..64e7e6c8145f 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -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[] = {