leds: lm3601x: Don't use mutex after it was destroyed
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 15 Aug 2022 08:02:27 +0000 (10:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:34:39 +0000 (12:34 +0200)
commit3d0a101e71395d185ce5826d76d396ef32a7f4b8
treefae34abf1a39a036e0bed641e238aa7cc80ab029
parent54a3201f3c1ff813523937da78b5fa7649dbab71
leds: lm3601x: Don't use mutex after it was destroyed

[ Upstream commit 32f7eed0c763a9b89f6b357ec54b48398fc7b99e ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/leds/flash/leds-lm3601x.c