ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 6 Apr 2016 11:36:06 +0000 (14:36 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 6 Apr 2016 17:06:29 +0000 (10:06 -0700)
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/haswell/sst-haswell-ipc.c

index ac60f1301e2102543a24b09319dd8b3233702743..91565229d07422414418dc7495a3f655f321e7a1 100644 (file)
@@ -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",