Skip to content

Commit c39cf60

Browse files
Uwe Kleine-KönigLee Jones
authored andcommitted
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 <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3bb4fb6 commit c39cf60

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

drivers/mfd/mc13xxx-core.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,15 +496,13 @@ int mc13xxx_common_init(struct device *dev)
496496
}
497497
EXPORT_SYMBOL_GPL(mc13xxx_common_init);
498498

499-
int mc13xxx_common_exit(struct device *dev)
499+
void mc13xxx_common_exit(struct device *dev)
500500
{
501501
struct mc13xxx *mc13xxx = dev_get_drvdata(dev);
502502

503503
mfd_remove_devices(dev);
504504
regmap_del_irq_chip(mc13xxx->irq, mc13xxx->irq_data);
505505
mutex_destroy(&mc13xxx->lock);
506-
507-
return 0;
508506
}
509507
EXPORT_SYMBOL_GPL(mc13xxx_common_exit);
510508

drivers/mfd/mc13xxx-i2c.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ static int mc13xxx_i2c_probe(struct i2c_client *client,
8787

8888
static int mc13xxx_i2c_remove(struct i2c_client *client)
8989
{
90-
return mc13xxx_common_exit(&client->dev);
90+
mc13xxx_common_exit(&client->dev);
91+
return 0;
9192
}
9293

9394
static struct i2c_driver mc13xxx_i2c_driver = {

drivers/mfd/mc13xxx-spi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ static int mc13xxx_spi_probe(struct spi_device *spi)
168168

169169
static int mc13xxx_spi_remove(struct spi_device *spi)
170170
{
171-
return mc13xxx_common_exit(&spi->dev);
171+
mc13xxx_common_exit(&spi->dev);
172+
return 0;
172173
}
173174

174175
static struct spi_driver mc13xxx_spi_driver = {

drivers/mfd/mc13xxx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ struct mc13xxx {
4444
};
4545

4646
int mc13xxx_common_init(struct device *dev);
47-
int mc13xxx_common_exit(struct device *dev);
47+
void mc13xxx_common_exit(struct device *dev);
4848

4949
#endif /* __DRIVERS_MFD_MC13XXX_H */

0 commit comments

Comments
 (0)