Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09b8852c authored by Colin Ian King's avatar Colin Ian King Committed by Mark Brown
Browse files

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1325734c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -3044,7 +3044,7 @@ static void rt5663_calibrate(struct rt5663_priv *rt5663)
		else
		else
			break;
			break;


		if (count > 200)
		if (++count > 200)
			break;
			break;
	}
	}