public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] Extcon: Arizona: unlock on an error in arizona_micdet()
@ 2012-07-11  6:36 Dan Carpenter
  2012-07-11 23:55 ` Chanwoo Choi
  2012-07-12 17:30 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2012-07-11  6:36 UTC (permalink / raw)
  To: MyungJoo Ham, Mark Brown; +Cc: Chanwoo Choi, linux-kernel, kernel-janitors

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;
 	}
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-12 17:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-11  6:36 [patch] Extcon: Arizona: unlock on an error in arizona_micdet() Dan Carpenter
2012-07-11 23:55 ` Chanwoo Choi
2012-07-12 17:30 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox