public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] Extcon: Arizona: unlock on an error in arizona_micdet()
Date: Thu, 12 Jul 2012 08:55:51 +0900	[thread overview]
Message-ID: <4FFE1287.90403@samsung.com> (raw)
In-Reply-To: <20120711063602.GG11812@elgon.mountain>

Hi Dan,

On 07/11/2012 03:36 PM, Dan Carpenter wrote:

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

This patch is right.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

  reply	other threads:[~2012-07-11 23:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11  6:36 [patch] Extcon: Arizona: unlock on an error in arizona_micdet() Dan Carpenter
2012-07-11 23:55 ` Chanwoo Choi [this message]
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=4FFE1287.90403@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dan.carpenter@oracle.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