Skip to content

Commit cf642fa

Browse files
Uwe Kleine-Königpavelmachek
authored andcommitted
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 <[email protected]> Signed-off-by: Pavel Machek <[email protected]>
1 parent 77d62fc commit cf642fa

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/leds/leds-lm3692x.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -494,11 +494,8 @@ static int lm3692x_probe(struct i2c_client *client,
494494
static int lm3692x_remove(struct i2c_client *client)
495495
{
496496
struct lm3692x_led *led = i2c_get_clientdata(client);
497-
int ret;
498497

499-
ret = lm3692x_leds_disable(led);
500-
if (ret)
501-
return ret;
498+
lm3692x_leds_disable(led);
502499
mutex_destroy(&led->lock);
503500

504501
return 0;

0 commit comments

Comments
 (0)