summaryrefslogtreecommitdiff
path: root/sound/soc/nuc900
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-12-09 14:52:28 +0300
committerMark Brown <broonie@kernel.org>2017-12-11 14:42:04 +0300
commit65a12b3aafed5fc59f4ce41b22b752b1729e6701 (patch)
tree797ccc1f06d9a6275bac225f9c94c8d2c0f4bdb9 /sound/soc/nuc900
parentcd430a244cd5d3ca0f4053718eabdf42bc12c517 (diff)
downloadlinux-65a12b3aafed5fc59f4ce41b22b752b1729e6701.tar.xz
ASoC: nuc900: Fix a loop timeout test
We should be finishing the loop with timeout set to zero but because this is a post-op we finish with timeout == -1. Fixes: 1082e2703a2d ("ASoC: NUC900/audio: add nuc900 audio driver support") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/nuc900')
-rw-r--r--sound/soc/nuc900/nuc900-ac97.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c
index 71fce7c85c93..81b09d740ed9 100644
--- a/sound/soc/nuc900/nuc900-ac97.c
+++ b/sound/soc/nuc900/nuc900-ac97.c
@@ -67,7 +67,7 @@ static unsigned short nuc900_ac97_read(struct snd_ac97 *ac97,
/* polling the AC_R_FINISH */
while (!(AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON) & AC_R_FINISH)
- && timeout--)
+ && --timeout)
mdelay(1);
if (!timeout) {
@@ -121,7 +121,7 @@ static void nuc900_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
/* polling the AC_W_FINISH */
while ((AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON) & AC_W_FINISH)
- && timeout--)
+ && --timeout)
mdelay(1);
if (!timeout)