summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorJianqun <jay.xu@rock-chips.com>2014-10-29 17:45:51 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-12-06 15:57:20 -0800
commitb147cad7f4ca8d0ad42e04f75993b10f895495e9 (patch)
tree2a49d135e5777e75f1924d90c7e2b84fa30f3d19 /sound
parentd926a995ebab02ced82afad60eb5a39872dad630 (diff)
ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_rxctrl
commit 29f95bd76f6ec1eff88eec6a04191104a11a7f97 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-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 fb9e05c9f471..244fb1cd1795 100644
--- a/sound/soc/rockchip/rockchip_i2s.c
+++ b/sound/soc/rockchip/rockchip_i2s.c
@@ -152,8 +152,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;
+ }
}
}
}