All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] ASoC: rt5665: Unlock on error in rt5665_calibrate()
@ 2016-11-18 11:56 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-11-18 11:56 UTC (permalink / raw)
  To: Bard Liao
  Cc: Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, alsa-devel, kernel-janitors

We should probably unlock before returning here.

Fixes: 33ada14a26c8 ("ASoC: add rt5665 codec driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/sound/soc/codecs/rt5665.c b/sound/soc/codecs/rt5665.c
index 34254fd..25bd01b 100644
--- a/sound/soc/codecs/rt5665.c
+++ b/sound/soc/codecs/rt5665.c
@@ -4587,7 +4587,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665)
 			pr_err("HP Calibration Failure\n");
 			regmap_write(rt5665->regmap, RT5665_RESET, 0);
 			regcache_cache_bypass(rt5665->regmap, false);
-			return;
+			goto unlock;
 		}
 
 		count++;
@@ -4606,7 +4606,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665)
 			pr_err("MONO Calibration Failure\n");
 			regmap_write(rt5665->regmap, RT5665_RESET, 0);
 			regcache_cache_bypass(rt5665->regmap, false);
-			return;
+			goto unlock;
 		}
 
 		count++;
@@ -4620,7 +4620,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665)
 
 	regmap_write(rt5665->regmap, RT5665_BIAS_CUR_CTRL_8, 0xa602);
 	regmap_write(rt5665->regmap, RT5665_ASRC_8, 0x0120);
-
+unlock:
 	mutex_unlock(&rt5665->calibrate_mutex);
 }
 

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

* [patch] ASoC: rt5665: Unlock on error in rt5665_calibrate()
@ 2016-11-18 11:56 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-11-18 11:56 UTC (permalink / raw)
  To: Bard Liao
  Cc: Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, alsa-devel, kernel-janitors

We should probably unlock before returning here.

Fixes: 33ada14a26c8 ("ASoC: add rt5665 codec driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/sound/soc/codecs/rt5665.c b/sound/soc/codecs/rt5665.c
index 34254fd..25bd01b 100644
--- a/sound/soc/codecs/rt5665.c
+++ b/sound/soc/codecs/rt5665.c
@@ -4587,7 +4587,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665)
 			pr_err("HP Calibration Failure\n");
 			regmap_write(rt5665->regmap, RT5665_RESET, 0);
 			regcache_cache_bypass(rt5665->regmap, false);
-			return;
+			goto unlock;
 		}
 
 		count++;
@@ -4606,7 +4606,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665)
 			pr_err("MONO Calibration Failure\n");
 			regmap_write(rt5665->regmap, RT5665_RESET, 0);
 			regcache_cache_bypass(rt5665->regmap, false);
-			return;
+			goto unlock;
 		}
 
 		count++;
@@ -4620,7 +4620,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665)
 
 	regmap_write(rt5665->regmap, RT5665_BIAS_CUR_CTRL_8, 0xa602);
 	regmap_write(rt5665->regmap, RT5665_ASRC_8, 0x0120);
-
+unlock:
 	mutex_unlock(&rt5665->calibrate_mutex);
 }
 

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

* Re: [patch] ASoC: rt5665: Unlock on error in rt5665_calibrate()
  2016-11-18 11:56 ` Dan Carpenter
  (?)
@ 2016-11-18 12:01 ` Mark Brown
  -1 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2016-11-18 12:01 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Bard Liao, Oder Chiou, Liam Girdwood, Jaroslav Kysela,
	Takashi Iwai, alsa-devel, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

On Fri, Nov 18, 2016 at 02:56:11PM +0300, Dan Carpenter wrote:
> We should probably unlock before returning here.
> 
> Fixes: 33ada14a26c8 ("ASoC: add rt5665 codec driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

This doesn't apply against current code, please check and resend.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

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

end of thread, other threads:[~2016-11-18 12:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-18 11:56 [patch] ASoC: rt5665: Unlock on error in rt5665_calibrate() Dan Carpenter
2016-11-18 11:56 ` Dan Carpenter
2016-11-18 12:01 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.