Skip to content

Commit 6969d0a

Browse files
geo-starklag-linaro
authored andcommitted
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: 59ea3c9 ("leds: add aw2013 driver") Signed-off-by: George Stark <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent bfa0f02 commit 6969d0a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/leds/leds-aw2013.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ static int aw2013_probe(struct i2c_client *client)
405405
chip->regulators);
406406

407407
error:
408+
mutex_unlock(&chip->mutex);
408409
mutex_destroy(&chip->mutex);
409410
return ret;
410411
}

0 commit comments

Comments
 (0)