summaryrefslogtreecommitdiffstats
path: root/sound/soc/rockchip/rockchip_i2s.c
diff options
context:
space:
mode:
authorJianqun <jay.xu@rock-chips.com>2014-10-29 10:45:51 +0100
committerMark Brown <broonie@kernel.org>2014-10-29 11:17:25 +0100
commit29f95bd76f6ec1eff88eec6a04191104a11a7f97 (patch)
tree0e4990a6e4049148dac4ceff0ab63341128829c2 /sound/soc/rockchip/rockchip_i2s.c
parentLinux 3.18-rc1 (diff)
downloadlinux-29f95bd76f6ec1eff88eec6a04191104a11a7f97.tar.xz
linux-29f95bd76f6ec1eff88eec6a04191104a11a7f97.zip
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 <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'sound/soc/rockchip/rockchip_i2s.c')
-rw-r--r--sound/soc/rockchip/rockchip_i2s.c4
1 files changed, 3 insertions, 1 deletions
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;
+ }
}
}
}