From: George Stark <gnstark@salutedevices.com>
To: <andy.shevchenko@gmail.com>, <pavel@ucw.cz>, <lee@kernel.org>,
<vadimp@nvidia.com>, <mpe@ellerman.id.au>, <npiggin@gmail.com>,
<christophe.leroy@csgroup.eu>, <hdegoede@redhat.com>,
<mazziesaccount@gmail.com>, <peterz@infradead.org>,
<mingo@redhat.com>, <will@kernel.org>, <longman@redhat.com>,
<boqun.feng@gmail.com>, <nikitos.tr@gmail.com>
Cc: kernel@salutedevices.com, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org,
George Stark <gnstark@salutedevices.com>
Subject: [PATCH v3 01/11] leds: aw2013: unlock mutex before destroying it
Date: Thu, 14 Dec 2023 01:30:10 +0300 [thread overview]
Message-ID: <20231213223020.2713164-2-gnstark@salutedevices.com> (raw)
In-Reply-To: <20231213223020.2713164-1-gnstark@salutedevices.com>
In the probe() callback in case of error mutex is destroyed being locked
which is not allowed so unlock the mutex before destroying.
Fixes: 59ea3c9faf32 ("leds: add aw2013 driver")
Signed-off-by: George Stark <gnstark@salutedevices.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.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.25.1
next prev parent reply other threads:[~2023-12-13 22:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-13 22:30 [PATCH v3 00/11] devm_led_classdev_register() usage problem George Stark
2023-12-13 22:30 ` George Stark [this message]
2023-12-13 22:30 ` [PATCH v3 02/11] locking: add define if mutex_destroy() is not an empty function George Stark
2023-12-14 1:52 ` Waiman Long
2023-12-13 22:30 ` [PATCH v3 03/11] devm-helpers: introduce devm_mutex_init George Stark
2023-12-13 22:36 ` Andy Shevchenko
2023-12-13 22:38 ` Andy Shevchenko
2023-12-14 9:16 ` Hans de Goede
2023-12-14 10:06 ` Christophe Leroy
2023-12-14 11:51 ` Hans de Goede
2023-12-14 12:48 ` George Stark
2023-12-14 13:00 ` Christophe Leroy
2023-12-14 13:42 ` Andy Shevchenko
2023-12-13 22:30 ` [PATCH v3 04/11] leds: aw2013: use devm API to cleanup module's resources George Stark
2023-12-14 5:42 ` Nikita Travkin
2023-12-14 12:58 ` George Stark
2023-12-14 13:47 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231213223020.2713164-2-gnstark@salutedevices.com \
--to=gnstark@salutedevices.com \
--cc=andy.shevchenko@gmail.com \
--cc=boqun.feng@gmail.com \
--cc=christophe.leroy@csgroup.eu \
--cc=hdegoede@redhat.com \
--cc=kernel@salutedevices.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=longman@redhat.com \
--cc=mazziesaccount@gmail.com \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=nikitos.tr@gmail.com \
--cc=npiggin@gmail.com \
--cc=pavel@ucw.cz \
--cc=peterz@infradead.org \
--cc=vadimp@nvidia.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).