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

mfd: mc13xxx: Make mc13xxx_common_exit() return void

Up to now mc13xxx_common_exit() 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@pengutronix.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20211012153945.2651412-9-u.kleine-koenig@pengutronix.de

authored by

Uwe Kleine-König and committed by
Lee Jones
c39cf60f 3bb4fb68

+6 -6
+1 -3
drivers/mfd/mc13xxx-core.c
··· 496 496 } 497 497 EXPORT_SYMBOL_GPL(mc13xxx_common_init); 498 498 499 - int mc13xxx_common_exit(struct device *dev) 499 + void mc13xxx_common_exit(struct device *dev) 500 500 { 501 501 struct mc13xxx *mc13xxx = dev_get_drvdata(dev); 502 502 503 503 mfd_remove_devices(dev); 504 504 regmap_del_irq_chip(mc13xxx->irq, mc13xxx->irq_data); 505 505 mutex_destroy(&mc13xxx->lock); 506 - 507 - return 0; 508 506 } 509 507 EXPORT_SYMBOL_GPL(mc13xxx_common_exit); 510 508
+2 -1
drivers/mfd/mc13xxx-i2c.c
··· 87 87 88 88 static int mc13xxx_i2c_remove(struct i2c_client *client) 89 89 { 90 - return mc13xxx_common_exit(&client->dev); 90 + mc13xxx_common_exit(&client->dev); 91 + return 0; 91 92 } 92 93 93 94 static struct i2c_driver mc13xxx_i2c_driver = {
+2 -1
drivers/mfd/mc13xxx-spi.c
··· 168 168 169 169 static int mc13xxx_spi_remove(struct spi_device *spi) 170 170 { 171 - return mc13xxx_common_exit(&spi->dev); 171 + mc13xxx_common_exit(&spi->dev); 172 + return 0; 172 173 } 173 174 174 175 static struct spi_driver mc13xxx_spi_driver = {
+1 -1
drivers/mfd/mc13xxx.h
··· 44 44 }; 45 45 46 46 int mc13xxx_common_init(struct device *dev); 47 - int mc13xxx_common_exit(struct device *dev); 47 + void mc13xxx_common_exit(struct device *dev); 48 48 49 49 #endif /* __DRIVERS_MFD_MC13XXX_H */