aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2016-11-16 08:08:41 -0500
committerMark Brown <broonie@kernel.org>2016-11-16 11:27:29 -0500
commit0c95666f0d7364e364ab53e068f7891c98e90012 (patch)
tree6a929f9754532872c9d8c7b528e3979f8d1bd66c
parent33ada14a26c8f174dac8765f4236ca66c64ae5be (diff)
ASoC: rt5665: Fix missing mutex_unlock in rt5665_calibrate
Reported-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/rt5665.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/codecs/rt5665.c b/sound/soc/codecs/rt5665.c
index 34254fd47efe..7dfaaf1c2d14 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)
4587 pr_err("HP Calibration Failure\n"); 4587 pr_err("HP Calibration Failure\n");
4588 regmap_write(rt5665->regmap, RT5665_RESET, 0); 4588 regmap_write(rt5665->regmap, RT5665_RESET, 0);
4589 regcache_cache_bypass(rt5665->regmap, false); 4589 regcache_cache_bypass(rt5665->regmap, false);
4590 return; 4590 goto out_unlock;
4591 } 4591 }
4592 4592
4593 count++; 4593 count++;
@@ -4606,7 +4606,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665)
4606 pr_err("MONO Calibration Failure\n"); 4606 pr_err("MONO Calibration Failure\n");
4607 regmap_write(rt5665->regmap, RT5665_RESET, 0); 4607 regmap_write(rt5665->regmap, RT5665_RESET, 0);
4608 regcache_cache_bypass(rt5665->regmap, false); 4608 regcache_cache_bypass(rt5665->regmap, false);
4609 return; 4609 goto out_unlock;
4610 } 4610 }
4611 4611
4612 count++; 4612 count++;
@@ -4621,6 +4621,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665)
4621 regmap_write(rt5665->regmap, RT5665_BIAS_CUR_CTRL_8, 0xa602); 4621 regmap_write(rt5665->regmap, RT5665_BIAS_CUR_CTRL_8, 0xa602);
4622 regmap_write(rt5665->regmap, RT5665_ASRC_8, 0x0120); 4622 regmap_write(rt5665->regmap, RT5665_ASRC_8, 0x0120);
4623 4623
4624out_unlock:
4624 mutex_unlock(&rt5665->calibrate_mutex); 4625 mutex_unlock(&rt5665->calibrate_mutex);
4625} 4626}
4626 4627