mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
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>
This commit is contained in:
parent
1325734c97
commit
09b8852c75
|
|
@ -3044,7 +3044,7 @@ static void rt5663_calibrate(struct rt5663_priv *rt5663)
|
|||
else
|
||||
break;
|
||||
|
||||
if (count > 200)
|
||||
if (++count > 200)
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user