Commit 6969d0a2 authored by George Stark's avatar George Stark Committed by Lee Jones

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: 59ea3c9f ("leds: add aw2013 driver")
Signed-off-by: default avatarGeorge Stark <gnstark@salutedevices.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20231214173614.2820929-2-gnstark@salutedevices.comSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent bfa0f02d
......@@ -405,6 +405,7 @@ static int aw2013_probe(struct i2c_client *client)
chip->regulators);
error:
mutex_unlock(&chip->mutex);
mutex_destroy(&chip->mutex);
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment