From: Axel Lin Date: Wed, 16 Nov 2016 13:08:41 +0000 (+0800) Subject: ASoC: rt5665: Fix missing mutex_unlock in rt5665_calibrate X-Git-Tag: v4.10-rc1~121^2~3^2~4^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c95666f0d7364e364ab53e068f7891c98e90012;p=thirdparty%2Fkernel%2Fstable.git ASoC: rt5665: Fix missing mutex_unlock in rt5665_calibrate Reported-by: Julia Lawall Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/rt5665.c b/sound/soc/codecs/rt5665.c index 34254fd47efea..7dfaaf1c2d140 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); }