ALSA: snd-powermac: timeout reaches -1
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 25 Feb 2009 12:40:26 +0000 (13:40 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 9 Mar 2009 13:58:37 +0000 (14:58 +0100)
If unsuccessful, timeout reaches -1 after the loop.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/ppc/burgundy.c

index f860d39af36b39e91fafe4ceb33be28b9d5b7167..45a76297c38d2224abd7fee9b3994f04fd2b2dcf 100644 (file)
@@ -35,7 +35,7 @@ snd_pmac_burgundy_busy_wait(struct snd_pmac *chip)
        int timeout = 50;
        while ((in_le32(&chip->awacs->codec_ctrl) & MASK_NEWECMD) && timeout--)
                udelay(1);
-       if (! timeout)
+       if (timeout < 0)
                printk(KERN_DEBUG "burgundy_busy_wait: timeout\n");
 }