summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoel Kluin <12o3l@tiscali.nl>2008-04-28 11:11:50 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 17:58:16 +0200
commit1ecf0d0cd28a4bfed3009f752061998e52d14db2 (patch)
treedc72f443149f69eb5edbed69774248fbfc32636f
parentmm: fix possible off-by-one in walk_pte_range() (diff)
downloadlinux-1ecf0d0cd28a4bfed3009f752061998e52d14db2.tar.xz
linux-1ecf0d0cd28a4bfed3009f752061998e52d14db2.zip
dz: test after postfix decrement fails in dz_console_putchar()
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> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-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 116211fcd36f..0dddd68b20d2 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);