summaryrefslogtreecommitdiff
path: root/drivers/iio/accel/bma400_spi.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-10-13 23:32:09 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-10-19 10:30:45 +0300
commitfa0b148eb396da85e34469d22730da5dfba30f0d (patch)
tree53a73b7f4fce6fbc706d6a4bb85fb9fc2f97a8b0 /drivers/iio/accel/bma400_spi.c
parent885b9790c25a5fb8b253971c107744b17d8c29e7 (diff)
downloadlinux-fa0b148eb396da85e34469d22730da5dfba30f0d.tar.xz
iio: accel: bma400: Make bma400_remove() return void
When an i2c or spi driver's remove function returns a non-zero error code nothing happens apart from emitting a generic error message. Make this error message more device specific and return zero instead in the remove callbacks. As the return value of bma400_remove() is unused then, change the function to not yield a return value. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20211013203223.2694577-2-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/accel/bma400_spi.c')
-rw-r--r--drivers/iio/accel/bma400_spi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iio/accel/bma400_spi.c b/drivers/iio/accel/bma400_spi.c
index 7c2825904e08..9f622e37477b 100644
--- a/drivers/iio/accel/bma400_spi.c
+++ b/drivers/iio/accel/bma400_spi.c
@@ -89,7 +89,9 @@ static int bma400_spi_probe(struct spi_device *spi)
static int bma400_spi_remove(struct spi_device *spi)
{
- return bma400_remove(&spi->dev);
+ bma400_remove(&spi->dev);
+
+ return 0;
}
static const struct spi_device_id bma400_spi_ids[] = {