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

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.com


Signed-off-by: default avatarLee Jones <lee@kernel.org>
parent bfa0f02d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
}