[PATCH 06/15] iio: accel: ad5064: Make ad5064_core_remove() return void

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Up to now ad5064_core_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 i2c and spi remove callbacks is ignored anyway.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
---
 drivers/iio/dac/ad5064.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/iio/dac/ad5064.c b/drivers/iio/dac/ad5064.c
index dff623b65e4f..6f66796942c0 100644
--- a/drivers/iio/dac/ad5064.c
+++ b/drivers/iio/dac/ad5064.c
@@ -900,7 +900,7 @@ static int ad5064_probe(struct device *dev, enum ad5064_type type,
 	return ret;
 }
 
-static int ad5064_remove(struct device *dev)
+static void ad5064_remove(struct device *dev)
 {
 	struct iio_dev *indio_dev = dev_get_drvdata(dev);
 	struct ad5064_state *st = iio_priv(indio_dev);
@@ -909,8 +909,6 @@ static int ad5064_remove(struct device *dev)
 
 	if (!st->use_internal_vref)
 		regulator_bulk_disable(ad5064_num_vref(st), st->vref_reg);
-
-	return 0;
 }
 
 #if IS_ENABLED(CONFIG_SPI_MASTER)
@@ -934,7 +932,9 @@ static int ad5064_spi_probe(struct spi_device *spi)
 
 static int ad5064_spi_remove(struct spi_device *spi)
 {
-	return ad5064_remove(&spi->dev);
+	ad5064_remove(&spi->dev);
+
+	return 0;
 }
 
 static const struct spi_device_id ad5064_spi_ids[] = {
@@ -1021,7 +1021,9 @@ static int ad5064_i2c_probe(struct i2c_client *i2c,
 
 static int ad5064_i2c_remove(struct i2c_client *i2c)
 {
-	return ad5064_remove(&i2c->dev);
+	ad5064_remove(&i2c->dev);
+
+	return 0;
 }
 
 static const struct i2c_device_id ad5064_i2c_ids[] = {
-- 
2.30.2




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux