* [PATCH] ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_rxctrl
@ 2014-10-29 9:45 Jianqun
2014-10-29 10:17 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Jianqun @ 2014-10-29 9:45 UTC (permalink / raw)
To: heiko, lgirdwood, broonie, perex, tiwai, linux-arm-kernel,
linux-rockchip, linux-kernel, alsa-devel
Cc: huangtao, cf, Jianqun
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>
---
sound/soc/rockchip/rockchip_i2s.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c
index f373e37..c74ba37 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;
+ }
}
}
}
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_rxctrl
2014-10-29 9:45 [PATCH] ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_rxctrl Jianqun
@ 2014-10-29 10:17 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-10-29 10:17 UTC (permalink / raw)
To: Jianqun
Cc: heiko, lgirdwood, perex, tiwai, linux-arm-kernel, linux-rockchip,
linux-kernel, alsa-devel, huangtao, cf
[-- Attachment #1: Type: text/plain, Size: 198 bytes --]
On Wed, Oct 29, 2014 at 05:45:51PM +0800, Jianqun wrote:
> We can get into an infinite loop if the I2S_CLR register fails to
> clear due to a missing break statement, so add that.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-29 10:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-29 9:45 [PATCH] ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_rxctrl Jianqun
2014-10-29 10:17 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®