From: George Stark Date: Thu, 14 Dec 2023 17:36:05 +0000 (+0300) Subject: leds: aw2013: Unlock mutex before destroying it X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6969d0a2ba1adc9ba6a49b9805f24080896c255c;p=linux.git leds: aw2013: Unlock mutex before destroying it In the probe() callback in case of error mutex is destroyed being locked which is not allowed so unlock the mutex before destroying. Fixes: 59ea3c9faf32 ("leds: add aw2013 driver") Signed-off-by: George Stark Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231214173614.2820929-2-gnstark@salutedevices.com Signed-off-by: Lee Jones --- diff --git a/drivers/leds/leds-aw2013.c b/drivers/leds/leds-aw2013.c index 91f44b23cb113..17235a5e576ae 100644 --- a/drivers/leds/leds-aw2013.c +++ b/drivers/leds/leds-aw2013.c @@ -405,6 +405,7 @@ error_reg: chip->regulators); error: + mutex_unlock(&chip->mutex); mutex_destroy(&chip->mutex); return ret; }