alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [patch] ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset()
@ 2016-04-06 11:36 Dan Carpenter
  2016-04-06 17:19 ` Applied "ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset()" to the asoc tree Mark Brown
  2016-04-07  1:21 ` [alsa-devel] [patch] ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset() Yang Jie
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-04-06 11:36 UTC (permalink / raw)
  To: Jie Yang
  Cc: alsa-devel, Liam Girdwood, kernel-janitors, linux-kernel,
	Takashi Iwai, Mark Brown

In the original code we ended the loop with tries set to -1 instead of
zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Not tested.

diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c b/sound/soc/intel/haswell/sst-haswell-ipc.c
index ac60f13..9156522 100644
--- a/sound/soc/intel/haswell/sst-haswell-ipc.c
+++ b/sound/soc/intel/haswell/sst-haswell-ipc.c
@@ -1345,7 +1345,7 @@ int sst_hsw_stream_reset(struct sst_hsw *hsw, struct sst_hsw_stream *stream)
 		return 0;
 
 	/* wait for pause to complete before we reset the stream */
-	while (stream->running && tries--)
+	while (stream->running && --tries)
 		msleep(1);
 	if (!tries) {
 		dev_err(hsw->dev, "error: reset stream %d still running\n",

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-07  1:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-06 11:36 [patch] ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset() Dan Carpenter
2016-04-06 17:19 ` Applied "ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset()" to the asoc tree Mark Brown
2016-04-07  1:21 ` [alsa-devel] [patch] ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset() Yang Jie

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).