From 7e79443ce250776b8477426127acdac15c567f22 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 11 Mar 2011 15:45:32 +0100 Subject: ALSA: atiixp - Fix wrong time-out checks during ac-link reset The time-out in snd_atiixp_aclink_reset() is wrongly checked, and it resulted in exiting from the loop at the first iteration. Reported-by: Amir Shamsuddin Signed-off-by: Takashi Iwai --- sound/pci/atiixp_modem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/pci/atiixp_modem.c') diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c index 91d7036b6411..2f74c2fdf1ea 100644 --- a/sound/pci/atiixp_modem.c +++ b/sound/pci/atiixp_modem.c @@ -498,7 +498,7 @@ static int snd_atiixp_aclink_reset(struct atiixp_modem *chip) atiixp_read(chip, CMD); msleep(1); atiixp_update(chip, CMD, ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_RESET); - if (--timeout) { + if (!--timeout) { snd_printk(KERN_ERR "atiixp-modem: codec reset timeout\n"); break; } -- cgit v1.2.3