* [PATCH] ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_txctrl
@ 2014-10-08 7:58 Sonny Rao
2014-10-08 11:29 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Sonny Rao @ 2014-10-08 7:58 UTC (permalink / raw)
To: Mark Brown
Cc: linux-kernel, dianders, Jianqun, Heiko Stuebner, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, linux-rockchip, alsa-devel,
linux-arm-kernel, Sonny Rao
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>
---
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 033487c..f373e37 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;
+ }
}
}
}
--
1.8.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_txctrl
2014-10-08 7:58 [PATCH] ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_txctrl Sonny Rao
@ 2014-10-08 11:29 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-10-08 11:29 UTC (permalink / raw)
To: Sonny Rao
Cc: linux-kernel, dianders, Jianqun, Heiko Stuebner, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, linux-rockchip, alsa-devel,
linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 200 bytes --]
On Wed, Oct 08, 2014 at 12:58:51AM -0700, Sonny Rao 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-08 11:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-08 7:58 [PATCH] ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_txctrl Sonny Rao
2014-10-08 11:29 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).