[alsa-devel] [PATCH 1/2] ASoC: rt5665: Fix missing mutex_unlock in rt5665_calibrate

Axel Lin axel.lin at ingics.com
Wed Nov 16 14:08:41 CET 2016


Reported-by: Julia Lawall <julia.lawall at lip6.fr>
Signed-off-by: Axel Lin <axel.lin at ingics.com>
---
 sound/soc/codecs/rt5665.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/rt5665.c b/sound/soc/codecs/rt5665.c
index 34254fd..7dfaaf1 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 out_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 out_unlock;
 		}
 
 		count++;
@@ -4621,6 +4621,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);
 
+out_unlock:
 	mutex_unlock(&rt5665->calibrate_mutex);
 }
 
-- 
2.9.3



More information about the Alsa-devel mailing list