2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-27 03:55:37 +08:00

ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_txctrl

We can get into an infinite loop if the I2S_CLR register fails to
clear due to a missing break statement, so add that.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Sonny Rao 2014-10-08 00:58:51 -07:00 committed by Mark Brown
parent a5448c88b8
commit 528a82b41f

View File

@ -108,8 +108,10 @@ static void rockchip_snd_txctrl(struct rk_i2s_dev *i2s, int on)
while (val) {
regmap_read(i2s->regmap, I2S_CLR, &val);
retry--;
if (!retry)
if (!retry) {
dev_warn(i2s->dev, "fail to clear\n");
break;
}
}
}
}