diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2022-01-13 11:14:29 +0100 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2022-04-28 17:24:10 +0100 |
commit | b6f29431820d16de4b16c465c44355d4aa522149 (patch) | |
tree | 42461467905ae3ec981cb9c92db1dc0eda7c001e /drivers/mfd/twl-core.c | |
parent | 380422ad344d461901dca85970ecc976e182f0c9 (diff) | |
download | linux-stable-b6f29431820d16de4b16c465c44355d4aa522149.tar.gz linux-stable-b6f29431820d16de4b16c465c44355d4aa522149.tar.bz2 linux-stable-b6f29431820d16de4b16c465c44355d4aa522149.zip |
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: 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-2-u.kleine-koenig@pengutronix.de
Diffstat (limited to 'drivers/mfd/twl-core.c')
-rw-r--r-- | drivers/mfd/twl-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index 289b556dede2..d4194faf1cc3 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -1036,12 +1036,12 @@ static void clocks_init(struct device *dev, static int twl_remove(struct i2c_client *client) { unsigned i, num_slaves; - int status; + int status = 0; if (twl_class_is_4030()) status = twl4030_exit_irq(); else - status = twl6030_exit_irq(); + twl6030_exit_irq(); if (status < 0) return status; |