From: Dan Carpenter <dan.carpenter@oracle.com>
To: MyungJoo Ham <myungjoo.ham@samsung.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] Extcon: Arizona: unlock on an error in arizona_micdet()
Date: Wed, 11 Jul 2012 09:36:02 +0300 [thread overview]
Message-ID: <20120711063602.GG11812@elgon.mountain> (raw)
Smatch complains about this. I don't have a way to test this, but it
does look like we should unlock on error here.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index b068bc9..4782884 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -154,6 +154,7 @@ static irqreturn_t arizona_micdet(int irq, void *data)
ret = regmap_read(arizona->regmap, ARIZONA_MIC_DETECT_3, &val);
if (ret != 0) {
dev_err(arizona->dev, "Failed to read MICDET: %d\n", ret);
+ mutex_unlock(&info->lock);
return IRQ_NONE;
}
next reply other threads:[~2012-07-11 6:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-11 6:36 Dan Carpenter [this message]
2012-07-11 23:55 ` [patch] Extcon: Arizona: unlock on an error in arizona_micdet() Chanwoo Choi
2012-07-12 17:30 ` Mark Brown
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=20120711063602.GG11812@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=cw00.choi@samsung.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
/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