diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2022-08-15 11:02:27 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2022-08-16 13:33:55 +0300 |
commit | 32f7eed0c763a9b89f6b357ec54b48398fc7b99e (patch) | |
tree | 0b83b3d43d8c192e69ade5f9d158daf9f2af79f6 | |
parent | af89fa11fae1cee4e07453f780e6e5573ef0f477 (diff) | |
download | linux-32f7eed0c763a9b89f6b357ec54b48398fc7b99e.tar.xz |
leds: lm3601x: Don't use mutex after it was destroyed
The mutex might still be in use until the devm cleanup callback
devm_led_classdev_flash_release() is called. This only happens some time
after lm3601x_remove() completed.
Fixes: e63a744871a3 ("leds: lm3601x: Convert class registration to device managed")
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
-rw-r--r-- | drivers/leds/flash/leds-lm3601x.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/leds/flash/leds-lm3601x.c b/drivers/leds/flash/leds-lm3601x.c index d0e1d4814042..3d1272748201 100644 --- a/drivers/leds/flash/leds-lm3601x.c +++ b/drivers/leds/flash/leds-lm3601x.c @@ -444,8 +444,6 @@ static int lm3601x_remove(struct i2c_client *client) { struct lm3601x_led *led = i2c_get_clientdata(client); - mutex_destroy(&led->lock); - return regmap_update_bits(led->regmap, LM3601X_ENABLE_REG, LM3601X_ENABLE_MASK, LM3601X_MODE_STANDBY); |