Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: accel: bmi088: Make bmi088_accel_core_remove() return void

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

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-4-u.kleine-koenig@pengutronix.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Uwe Kleine-König and committed by
Jonathan Cameron
bcf9d61a 9713964f

+5 -5
+1 -3
drivers/iio/accel/bmi088-accel-core.c
··· 536 536 EXPORT_SYMBOL_GPL(bmi088_accel_core_probe); 537 537 538 538 539 - int bmi088_accel_core_remove(struct device *dev) 539 + void bmi088_accel_core_remove(struct device *dev) 540 540 { 541 541 struct iio_dev *indio_dev = dev_get_drvdata(dev); 542 542 struct bmi088_accel_data *data = iio_priv(indio_dev); ··· 546 546 pm_runtime_disable(dev); 547 547 pm_runtime_set_suspended(dev); 548 548 bmi088_accel_power_down(data); 549 - 550 - return 0; 551 549 } 552 550 EXPORT_SYMBOL_GPL(bmi088_accel_core_remove); 553 551
+3 -1
drivers/iio/accel/bmi088-accel-spi.c
··· 58 58 59 59 static int bmi088_accel_remove(struct spi_device *spi) 60 60 { 61 - return bmi088_accel_core_remove(&spi->dev); 61 + bmi088_accel_core_remove(&spi->dev); 62 + 63 + return 0; 62 64 } 63 65 64 66 static const struct spi_device_id bmi088_accel_id[] = {
+1 -1
drivers/iio/accel/bmi088-accel.h
··· 13 13 14 14 int bmi088_accel_core_probe(struct device *dev, struct regmap *regmap, int irq, 15 15 const char *name, bool block_supported); 16 - int bmi088_accel_core_remove(struct device *dev); 16 + void bmi088_accel_core_remove(struct device *dev); 17 17 18 18 #endif /* BMI088_ACCEL_H */