diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2022-02-06 23:08:12 +0100 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2022-02-12 13:02:50 +0100 |
commit | cf642faef74f453df14c2b8cef533dfd819f425e (patch) | |
tree | ba0825c728f1f495eba4afc5aafd18ed506d82b5 /drivers/leds | |
parent | 77d62fccebd4dd2e4dbec2bbe581ef98e128561b (diff) | |
download | linux-cf642faef74f453df14c2b8cef533dfd819f425e.tar.gz linux-cf642faef74f453df14c2b8cef533dfd819f425e.tar.bz2 linux-cf642faef74f453df14c2b8cef533dfd819f425e.zip |
leds: lm3692x: Return 0 from remove callback
The only difference between returning zero or a non-zero value is that
for the non-zero case the i2c will print a generic error message
("remove failed (-ESOMETHING), will be ignored").
In this case however the driver itself already emitted a more helpful
error message, so the additional error message isn't helpful at all.
The long-term goal is to make the i2c remove callback return void, making
all implementations return 0 is preparatory work for this change.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-lm3692x.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/leds/leds-lm3692x.c b/drivers/leds/leds-lm3692x.c index afe6fb297855..87cd24ce3f95 100644 --- a/drivers/leds/leds-lm3692x.c +++ b/drivers/leds/leds-lm3692x.c @@ -494,11 +494,8 @@ static int lm3692x_probe(struct i2c_client *client, static int lm3692x_remove(struct i2c_client *client) { struct lm3692x_led *led = i2c_get_clientdata(client); - int ret; - ret = lm3692x_leds_disable(led); - if (ret) - return ret; + lm3692x_leds_disable(led); mutex_destroy(&led->lock); return 0; |