public inbox for linux-kernel@vger.kernel.org
 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-07  1:21 ` [alsa-devel] " Yang Jie
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-04-06 11:36 UTC (permalink / raw)
  To: Jie Yang
  Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	alsa-devel, linux-kernel, kernel-janitors

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] 2+ messages in thread

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

Thread overview: 2+ 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-07  1:21 ` [alsa-devel] " Yang Jie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox