Re: [patch] Extcon: Arizona: unlock on an error in arizona_micdet()

2012-07-12 Thread Mark Brown
On Wed, Jul 11, 2012 at 09:36:02AM +0300, 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 

Acke-dby: Mark Brown 


signature.asc
Description: Digital signature


Re: [patch] Extcon: Arizona: unlock on an error in arizona_micdet()

2012-07-12 Thread Mark Brown
On Wed, Jul 11, 2012 at 09:36:02AM +0300, 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.carpen...@oracle.com

Acke-dby: Mark Brown broo...@opensource.wolfsonmicro.com


signature.asc
Description: Digital signature


Re: [patch] Extcon: Arizona: unlock on an error in arizona_micdet()

2012-07-11 Thread Chanwoo Choi
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 
> 
> 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, );
>   if (ret != 0) {
>   dev_err(arizona->dev, "Failed to read MICDET: %d\n", ret);
> + mutex_unlock(>lock);
>   return IRQ_NONE;
>   }
>  

This patch is right.

Signed-off-by: Chanwoo Choi 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[patch] Extcon: Arizona: unlock on an error in arizona_micdet()

2012-07-11 Thread Dan Carpenter
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 

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, );
if (ret != 0) {
dev_err(arizona->dev, "Failed to read MICDET: %d\n", ret);
+   mutex_unlock(>lock);
return IRQ_NONE;
}
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[patch] Extcon: Arizona: unlock on an error in arizona_micdet()

2012-07-11 Thread Dan Carpenter
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.carpen...@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;
}
 
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] Extcon: Arizona: unlock on an error in arizona_micdet()

2012-07-11 Thread Chanwoo Choi
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.carpen...@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.c...@samsung.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/