summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5663.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-07-10 16:20:45 +0100
committerMark Brown <broonie@kernel.org>2017-07-17 12:05:54 +0100
commit09b8852c759917e3ea10062b374692a5313cbfd8 (patch)
treec84df63bc74711924258a4144655f3d548442372 /sound/soc/codecs/rt5663.c
parent1325734c97c533c2042794f2bd873486b4905cdb (diff)
ASoC: rt5663: add in missing loop counter to avoid infinite loop
The loop counter 'count' is missing an increment, so we could end up with an infinite loop. Add in a pre-increment to count to fix this. Detected by CoverityScan, CID#1450120 ("Logically Dead Code") Fixes: 1a425dbf1a10 ("ASoC: rt5663: Update the calibration funciton") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5663.c')
-rw-r--r--sound/soc/codecs/rt5663.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt5663.c b/sound/soc/codecs/rt5663.c
index 82edbcf39caa..5b3c50c641d8 100644
--- a/sound/soc/codecs/rt5663.c
+++ b/sound/soc/codecs/rt5663.c
@@ -3044,7 +3044,7 @@ static void rt5663_calibrate(struct rt5663_priv *rt5663)
else
break;
- if (count > 200)
+ if (++count > 200)
break;
}