diff options
author | Sonny Rao <sonnyrao@chromium.org> | 2014-10-08 00:58:51 -0700 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-10-08 12:29:38 +0100 |
commit | 528a82b41fda78435976c905546c3329c86bb264 (patch) | |
tree | 77626685b580c77669c4e11e2af6ae9a403f1e32 /sound/soc/rockchip | |
parent | a5448c88b812390a3622e76d774e10c0da1fb970 (diff) | |
download | linux-528a82b41fda78435976c905546c3329c86bb264.tar.gz linux-528a82b41fda78435976c905546c3329c86bb264.tar.bz2 linux-528a82b41fda78435976c905546c3329c86bb264.zip |
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>
Diffstat (limited to 'sound/soc/rockchip')
-rw-r--r-- | sound/soc/rockchip/rockchip_i2s.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c index 033487c9a164..f373e37f8305 100644 --- a/sound/soc/rockchip/rockchip_i2s.c +++ b/sound/soc/rockchip/rockchip_i2s.c @@ -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; + } } } } |