From: Jianqun Date: Wed, 29 Oct 2014 09:45:51 +0000 (+0800) Subject: ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_rxctrl X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=29f95bd76f6ec1eff88eec6a04191104a11a7f97;p=openwrt%2Fstaging%2Fblogic.git ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_rxctrl 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: Jianqun Signed-off-by: Mark Brown Cc: stable@vger.kernel.org --- diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c index f373e37f8305..c74ba37f862c 100644 --- a/sound/soc/rockchip/rockchip_i2s.c +++ b/sound/soc/rockchip/rockchip_i2s.c @@ -154,8 +154,10 @@ static void rockchip_snd_rxctrl(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; + } } } }