summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-07 17:10:05 +0900
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-07 17:14:04 +0900
commit8afd0ef2639ea2b7bc1b3a0f927ab14e0df034df (patch)
tree24d6abbf96e64b54b1e5aec882bd57b1a9bdd2a2 /sound/soc
parent98869f68f2f68a9f238f5e96dbc3f838a0ff7136 (diff)
ASoC: wm8994: Fix variable double use
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm8994.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 82411009d40..f2e63acb267 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -3721,7 +3721,7 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data)
{
struct wm8994_priv *wm8994 = data;
struct snd_soc_codec *codec = wm8994->hubs.codec;
- int reg, count;
+ int reg, count, ret;
/*
* Jack detection may have detected a removal simulataneously
@@ -3767,11 +3767,11 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data)
/* Avoid a transient report when the accessory is being removed */
if (wm8994->jackdet) {
- reg = snd_soc_read(codec, WM1811_JACKDET_CTRL);
- if (reg < 0) {
+ ret = snd_soc_read(codec, WM1811_JACKDET_CTRL);
+ if (ret < 0) {
dev_err(codec->dev, "Failed to read jack status: %d\n",
- reg);
- } else if (!(reg & WM1811_JACKDET_LVL)) {
+ ret);
+ } else if (!(ret & WM1811_JACKDET_LVL)) {
dev_dbg(codec->dev, "Ignoring removed jack\n");
return IRQ_HANDLED;
}