All of lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@kernel.org>
Cc: Oder Chiou <oder_chiou@realtek.com>,
	alsa-devel@alsa-project.org, Axel Lin <axel.lin@ingics.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Julia Lawall <julia.lawall@lip6.fr>,
	Bard Liao <bardliao@realtek.com>
Subject: [PATCH 1/2] ASoC: rt5665: Fix missing mutex_unlock in rt5665_calibrate
Date: Wed, 16 Nov 2016 21:08:41 +0800	[thread overview]
Message-ID: <20161116130842.28182-1-axel.lin@ingics.com> (raw)

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Axel Lin <axel.lin@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

             reply	other threads:[~2016-11-16 13:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16 13:08 Axel Lin [this message]
2016-11-16 13:08 ` [PATCH 2/2] ASoC: rt5665: Use devm_gpio_request_one() Axel Lin
2016-11-18 12:01   ` Applied "ASoC: rt5665: Use devm_gpio_request_one()" to the asoc tree Mark Brown
2016-11-18 12:01 ` Applied "ASoC: rt5665: Fix missing mutex_unlock in rt5665_calibrate" " Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161116130842.28182-1-axel.lin@ingics.com \
    --to=axel.lin@ingics.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bardliao@realtek.com \
    --cc=broonie@kernel.org \
    --cc=julia.lawall@lip6.fr \
    --cc=lgirdwood@gmail.com \
    --cc=oder_chiou@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.