mfd: tps65912: Make tps65912_device_exit() return void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 12 Oct 2021 15:39:35 +0000 (17:39 +0200)
committerLee Jones <lee.jones@linaro.org>
Fri, 5 Nov 2021 14:40:26 +0000 (14:40 +0000)
Up to now tps65912_device_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-11-u.kleine-koenig@pengutronix.de
drivers/mfd/tps65912-core.c
drivers/mfd/tps65912-i2c.c
drivers/mfd/tps65912-spi.c
include/linux/mfd/tps65912.h

index b55b1d5d69554d9d58d50a29dbedb48ec77fbb5d..c282a05e71462ab04be5dddc616f1d54011b3e8b 100644 (file)
@@ -115,11 +115,9 @@ int tps65912_device_init(struct tps65912 *tps)
 }
 EXPORT_SYMBOL_GPL(tps65912_device_init);
 
-int tps65912_device_exit(struct tps65912 *tps)
+void tps65912_device_exit(struct tps65912 *tps)
 {
        regmap_del_irq_chip(tps->irq, tps->irq_data);
-
-       return 0;
 }
 EXPORT_SYMBOL_GPL(tps65912_device_exit);
 
index f7c22ea7b36cac53c69f3d5f619989ac7a589a69..06eb2784d3227dc5622db662a6ec461844e93e33 100644 (file)
@@ -55,7 +55,9 @@ static int tps65912_i2c_remove(struct i2c_client *client)
 {
        struct tps65912 *tps = i2c_get_clientdata(client);
 
-       return tps65912_device_exit(tps);
+       tps65912_device_exit(tps);
+
+       return 0;
 }
 
 static const struct i2c_device_id tps65912_i2c_id_table[] = {
index 21a8d6ac5c4a5a4e01fd5bab86ad53975fb16d19..d701926aa46e67826b8086f88fbb86143d97e378 100644 (file)
@@ -54,7 +54,9 @@ static int tps65912_spi_remove(struct spi_device *spi)
 {
        struct tps65912 *tps = spi_get_drvdata(spi);
 
-       return tps65912_device_exit(tps);
+       tps65912_device_exit(tps);
+
+       return 0;
 }
 
 static const struct spi_device_id tps65912_spi_id_table[] = {
index 7943e413deae61a151caabcf4cd385c6d0a0395c..8a61386cb8c167ca3088dc5c24696df83884060d 100644 (file)
@@ -322,6 +322,6 @@ struct tps65912 {
 extern const struct regmap_config tps65912_regmap_config;
 
 int tps65912_device_init(struct tps65912 *tps);
-int tps65912_device_exit(struct tps65912 *tps);
+void tps65912_device_exit(struct tps65912 *tps);
 
 #endif /*  __LINUX_MFD_TPS65912_H */