Commit b6f29431 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Lee Jones

mfd: twl6030: Make twl6030_exit_irq() return void

This function returns 0 unconditionally, so there is no benefit in
returning a value at all and make the caller do error checking.

Also the caller (twl_remove()) cannot do anything sensible with an error
code. Passing it up the call stack isn't a good option because the i2c core
ignores error codes (apart from emitting an error message).
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220113101430.12869-2-u.kleine-koenig@pengutronix.de
parent 380422ad
...@@ -1036,12 +1036,12 @@ static void clocks_init(struct device *dev, ...@@ -1036,12 +1036,12 @@ static void clocks_init(struct device *dev,
static int twl_remove(struct i2c_client *client) static int twl_remove(struct i2c_client *client)
{ {
unsigned i, num_slaves; unsigned i, num_slaves;
int status; int status = 0;
if (twl_class_is_4030()) if (twl_class_is_4030())
status = twl4030_exit_irq(); status = twl4030_exit_irq();
else else
status = twl6030_exit_irq(); twl6030_exit_irq();
if (status < 0) if (status < 0)
return status; return status;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#define __TWL_CORE_H__ #define __TWL_CORE_H__
extern int twl6030_init_irq(struct device *dev, int irq_num); extern int twl6030_init_irq(struct device *dev, int irq_num);
extern int twl6030_exit_irq(void); extern void twl6030_exit_irq(void);
extern int twl4030_init_irq(struct device *dev, int irq_num); extern int twl4030_init_irq(struct device *dev, int irq_num);
extern int twl4030_exit_irq(void); extern int twl4030_exit_irq(void);
extern int twl4030_init_chip_irq(const char *chip); extern int twl4030_init_chip_irq(const char *chip);
......
...@@ -438,7 +438,7 @@ int twl6030_init_irq(struct device *dev, int irq_num) ...@@ -438,7 +438,7 @@ int twl6030_init_irq(struct device *dev, int irq_num)
return status; return status;
} }
int twl6030_exit_irq(void) void twl6030_exit_irq(void)
{ {
if (twl6030_irq && twl6030_irq->twl_irq) { if (twl6030_irq && twl6030_irq->twl_irq) {
unregister_pm_notifier(&twl6030_irq->pm_nb); unregister_pm_notifier(&twl6030_irq->pm_nb);
...@@ -453,6 +453,5 @@ int twl6030_exit_irq(void) ...@@ -453,6 +453,5 @@ int twl6030_exit_irq(void)
* in this module. * in this module.
*/ */
} }
return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment