Browse Source

irda: smsc wait count reaches -1

The sir retries count reaches -1 rather than 0.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Roel Kluin 16 năm trước cách đây
mục cha
commit
adbf7f01e7
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      drivers/net/irda/smsc-ircc2.c

+ 1 - 1
drivers/net/irda/smsc-ircc2.c

@@ -2124,7 +2124,7 @@ static void smsc_ircc_sir_wait_hw_transmitter_finish(struct smsc_ircc_cb *self)
 	while (count-- > 0 && !(inb(iobase + UART_LSR) & UART_LSR_TEMT))
 		udelay(1);
 
-	if (count == 0)
+	if (count < 0)
 		IRDA_DEBUG(0, "%s(): stuck transmitter\n", __func__);
 }