[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231204180603.470421-3-gnstark@salutedevices.com>
Date: Mon, 4 Dec 2023 21:05:55 +0300
From: George Stark <gnstark@...utedevices.com>
To: <pavel@....cz>, <lee@...nel.org>, <vadimp@...dia.com>,
<mpe@...erman.id.au>, <npiggin@...il.com>,
<christophe.leroy@...roup.eu>, <hdegoede@...hat.com>,
<mazziesaccount@...il.com>, <andy.shevchenko@...il.com>,
<jic23@...nel.org>
CC: <linux-leds@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linuxppc-dev@...ts.ozlabs.org>, <kernel@...utedevices.com>,
George Stark <gnstark@...utedevices.com>
Subject: [PATCH v2 02/10] 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 mute before destroying.
Signed-off-by: George Stark <gnstark@...utedevices.com>
---
drivers/leds/leds-aw2013.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/leds/leds-aw2013.c b/drivers/leds/leds-aw2013.c
index 59765640b70f..c2bc0782c0cd 100644
--- a/drivers/leds/leds-aw2013.c
+++ b/drivers/leds/leds-aw2013.c
@@ -397,6 +397,7 @@ static int aw2013_probe(struct i2c_client *client)
regulator_disable(chip->vcc_regulator);
error:
+ mutex_unlock(&chip->mutex);
mutex_destroy(&chip->mutex);
return ret;
}
--
2.38.4
Powered by blists - more mailing lists