]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
ASoC: rt5665: Fix missing mutex_unlock in rt5665_calibrate
authorAxel Lin <axel.lin@ingics.com>
Wed, 16 Nov 2016 13:08:41 +0000 (21:08 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 16 Nov 2016 16:27:29 +0000 (16:27 +0000)
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>
sound/soc/codecs/rt5665.c

index 34254fd47efea395f5e36476baf2850f2c31d1d1..7dfaaf1c2d140b1d20b296b26a76c19c067b66cd 100644 (file)
@@ -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);
 }