aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRoel Kluin <12o3l@tiscali.nl>2008-04-28 17:15:41 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2008-05-01 14:44:38 -0700
commit35a398abdc1b5111b62bca9174bc5ccf973ab6dc (patch)
treec7e5f27e52de3cbd034656e2e88a2fdc28f360fd /drivers
parentf2645293d3aa4ecde52a3f5e6982b43d60171f36 (diff)
dz: test after postfix decrement fails in dz_console_putchar()
commit 1ecf0d0cd28a4bfed3009f752061998e52d14db2 upstream When loops reaches 0 the postfix decrement still subtracts, so the subsequent test fails. Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Acked-by: Maciej W. Rozycki <macro@linux-mips.org> Cc: Johannes Weiner <hannes@saeurebad.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/serial/dz.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/serial/dz.c b/drivers/serial/dz.c
index 116211fcd36..0dddd68b20d 100644
--- a/drivers/serial/dz.c
+++ b/drivers/serial/dz.c
@@ -819,7 +819,7 @@ static void dz_console_putchar(struct uart_port *uport, int ch)
dz_out(dport, DZ_TCR, mask);
iob();
udelay(2);
- } while (loops--);
+ } while (--loops);
if (loops) /* Cannot send otherwise. */
dz_out(dport, DZ_TDR, ch);