public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hvc_console: Fix test on unsigned in hvc_console_print()
@ 2009-10-16 16:05 Roel Kluin
  0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-10-16 16:05 UTC (permalink / raw)
  To: Andrew Morton, miltonm, anton, LKML

vtermnos[] is unsigned, so this test was wrong.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index a632f25..28e4758 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -146,7 +146,7 @@ static void hvc_console_print(struct console *co, const char *b,
 		return;
 
 	/* This console adapter was removed so it is not usable. */
-	if (vtermnos[index] < 0)
+	if (vtermnos[index] == -1)
 		return;
 
 	while (count > 0 || i > 0) {

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-16 15:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-16 16:05 [PATCH] hvc_console: Fix test on unsigned in hvc_console_print() Roel Kluin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox