Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ecf0d0c authored by Roel Kluin's avatar Roel Kluin Committed by Linus Torvalds
Browse files

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: default avatarRoel Kluin <12o3l@tiscali.nl>
Acked-by: default avatarMaciej W. Rozycki <macro@linux-mips.org>
Cc: Johannes Weiner <hannes@saeurebad.de>
Cc: <stable@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 556637cd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);