Commit 3ceed021 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Jonathan Cameron

iio: dac: ad5686: Make ad5686_remove() return void

Up to now ad5686_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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: default avatarAlexandru Ardelean <ardeleanalex@gmail.com>
Link: https://lore.kernel.org/r/20211013203223.2694577-11-u.kleine-koenig@pengutronix.deSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 72ba4505
......@@ -97,7 +97,9 @@ static int ad5686_spi_probe(struct spi_device *spi)
static int ad5686_spi_remove(struct spi_device *spi)
{
return ad5686_remove(&spi->dev);
ad5686_remove(&spi->dev);
return 0;
}
static const struct spi_device_id ad5686_spi_id[] = {
......
......@@ -538,7 +538,7 @@ int ad5686_probe(struct device *dev,
}
EXPORT_SYMBOL_GPL(ad5686_probe);
int ad5686_remove(struct device *dev)
void ad5686_remove(struct device *dev)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev);
struct ad5686_state *st = iio_priv(indio_dev);
......@@ -546,8 +546,6 @@ int ad5686_remove(struct device *dev)
iio_device_unregister(indio_dev);
if (!IS_ERR(st->reg))
regulator_disable(st->reg);
return 0;
}
EXPORT_SYMBOL_GPL(ad5686_remove);
......
......@@ -154,7 +154,7 @@ int ad5686_probe(struct device *dev,
const char *name, ad5686_write_func write,
ad5686_read_func read);
int ad5686_remove(struct device *dev);
void ad5686_remove(struct device *dev);
#endif /* __DRIVERS_IIO_DAC_AD5686_H__ */
......@@ -67,7 +67,9 @@ static int ad5686_i2c_probe(struct i2c_client *i2c,
static int ad5686_i2c_remove(struct i2c_client *i2c)
{
return ad5686_remove(&i2c->dev);
ad5686_remove(&i2c->dev);
return 0;
}
static const struct i2c_device_id ad5686_i2c_id[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment