Skip to contentSkip to conversation

hvc_console: Fix test on unsigned in hvc_console_print()

PATCH New Roel Kluin 1 participant 1 message Oct 16, 2009 Char and misc drivers

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 hvc_console: Fix test on unsigned in hvc_console_print()

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

---

drivers/char/hvc_console.c +1 -1
index a632f25..28e4758 100644
@@ -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) {