Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Roel Kluin and committed by
Linus Torvalds
1ecf0d0c 556637cd

+1 -1
+1 -1
drivers/serial/dz.c
··· 819 819 dz_out(dport, DZ_TCR, mask); 820 820 iob(); 821 821 udelay(2); 822 - } while (loops--); 822 + } while (--loops); 823 823 824 824 if (loops) /* Cannot send otherwise. */ 825 825 dz_out(dport, DZ_TDR, ch);