diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-07-10 17:20:45 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-07-17 13:05:54 +0200 |
commit | 09b8852c759917e3ea10062b374692a5313cbfd8 (patch) | |
tree | c84df63bc74711924258a4144655f3d548442372 /sound/soc/codecs | |
parent | ASoC: rt5663: Modify the power sequence for reducing the pop sound (diff) | |
download | linux-09b8852c759917e3ea10062b374692a5313cbfd8.tar.xz linux-09b8852c759917e3ea10062b374692a5313cbfd8.zip |
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')
-rw-r--r-- | sound/soc/codecs/rt5663.c | 2 |
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; } |