Skip to content

Commit ec14d90

Browse files
Uwe Kleine-KönigLee Jones
authored andcommitted
mfd: tps65912: Make tps65912_device_exit() return void
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 <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 356bbab commit ec14d90

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

drivers/mfd/tps65912-core.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,9 @@ int tps65912_device_init(struct tps65912 *tps)
115115
}
116116
EXPORT_SYMBOL_GPL(tps65912_device_init);
117117

118-
int tps65912_device_exit(struct tps65912 *tps)
118+
void tps65912_device_exit(struct tps65912 *tps)
119119
{
120120
regmap_del_irq_chip(tps->irq, tps->irq_data);
121-
122-
return 0;
123121
}
124122
EXPORT_SYMBOL_GPL(tps65912_device_exit);
125123

drivers/mfd/tps65912-i2c.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ static int tps65912_i2c_remove(struct i2c_client *client)
5555
{
5656
struct tps65912 *tps = i2c_get_clientdata(client);
5757

58-
return tps65912_device_exit(tps);
58+
tps65912_device_exit(tps);
59+
60+
return 0;
5961
}
6062

6163
static const struct i2c_device_id tps65912_i2c_id_table[] = {

drivers/mfd/tps65912-spi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ static int tps65912_spi_remove(struct spi_device *spi)
5454
{
5555
struct tps65912 *tps = spi_get_drvdata(spi);
5656

57-
return tps65912_device_exit(tps);
57+
tps65912_device_exit(tps);
58+
59+
return 0;
5860
}
5961

6062
static const struct spi_device_id tps65912_spi_id_table[] = {

include/linux/mfd/tps65912.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,6 @@ struct tps65912 {
322322
extern const struct regmap_config tps65912_regmap_config;
323323

324324
int tps65912_device_init(struct tps65912 *tps);
325-
int tps65912_device_exit(struct tps65912 *tps);
325+
void tps65912_device_exit(struct tps65912 *tps);
326326

327327
#endif /* __LINUX_MFD_TPS65912_H */

0 commit comments

Comments
 (0)