mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-19 12:24:34 +08:00
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: 59ea3c9faf
("leds: add aw2013 driver")
Signed-off-by: George Stark <gnstark@salutedevices.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20231214173614.2820929-2-gnstark@salutedevices.com
Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
bfa0f02d75
commit
6969d0a2ba
@ -405,6 +405,7 @@ error_reg:
|
||||
chip->regulators);
|
||||
|
||||
error:
|
||||
mutex_unlock(&chip->mutex);
|
||||
mutex_destroy(&chip->mutex);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user