aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2016-10-13 11:47:13 +0300
committerMark Brown <[email protected]>2016-10-13 15:01:32 +0200
commitc975e39ccadf6dc047356c60773a043a2293b8cd (patch)
tree92f39190b50557bba806288797ba6ae43ba8bfa6
parent513e43efafe329dad7b5794583b67ac898dcbdca (diff)
ASoC: rt5663: fix a debug statement
We increment "i" before printing the debug statement. That makes it the wrong sleep_time[] information and Smatch complains that the last increment could be beyond the end of the array. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Bard Liao <[email protected]> Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/codecs/rt5663.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/rt5663.c b/sound/soc/codecs/rt5663.c
index 01a18d88f1eb..00ff2788879e 100644
--- a/sound/soc/codecs/rt5663.c
+++ b/sound/soc/codecs/rt5663.c
@@ -1547,11 +1547,11 @@ static int rt5663_jack_detect(struct snd_soc_codec *codec, int jack_insert)
msleep(sleep_time[i]);
val = snd_soc_read(codec, RT5663_EM_JACK_TYPE_2) &
0x0003;
+ dev_dbg(codec->dev, "%s: MX-00e7 val=%x sleep %d\n",
+ __func__, val, sleep_time[i]);
i++;
if (val == 0x1 || val == 0x2 || val == 0x3)
break;
- dev_dbg(codec->dev, "%s: MX-00e7 val=%x sleep %d\n",
- __func__, val, sleep_time[i]);
}
dev_dbg(codec->dev, "%s val = %d\n", __func__, val);
switch (val) {