diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2022-01-13 11:14:30 +0100 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2022-04-28 17:24:40 +0100 |
commit | 724c3be3db3413b930320cb716214e37cf0a40e2 (patch) | |
tree | 9ae1bf98eff7eae25c7143ec4f465a771d197ce1 /drivers/mfd/twl-core.c | |
parent | b6f29431820d16de4b16c465c44355d4aa522149 (diff) |
mfd: twl4030: Make twl4030_exit_irq() return void
If twl4030_exit_irq() returns an error, the effect is that the caller
(twl_remove()) forwards the error to the i2c core without unregistering
its dummy slave devices. This only makes the i2c core emit another
error message and then it still removes the device.
In this situation it doesn't make sense to abort the remove cleanup and not
unregister the slave devices. So do that. Then return value is actually
unused and twl4030_exit_irq() can better be changed to return no value at
all.
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/20220113101430.12869-3-u.kleine-koenig@pengutronix.de
Diffstat (limited to 'drivers/mfd/twl-core.c')
-rw-r--r-- | drivers/mfd/twl-core.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index d4194faf1cc3..bd6659cf3bc0 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -1036,16 +1036,12 @@ static void clocks_init(struct device *dev, static int twl_remove(struct i2c_client *client) { unsigned i, num_slaves; - int status = 0; if (twl_class_is_4030()) - status = twl4030_exit_irq(); + twl4030_exit_irq(); else twl6030_exit_irq(); - if (status < 0) - return status; - num_slaves = twl_get_num_slaves(); for (i = 0; i < num_slaves; i++) { struct twl_client *twl = &twl_priv->twl_modules[i]; |