lkml.org 
[lkml]   [2012]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] Extcon: Arizona: unlock on an error in arizona_micdet()
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>


\
 
 \ /
  Last update: 2012-07-12 02:21    [W:0.064 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site