From: Roel Kluin Date: Wed, 9 Dec 2009 20:34:16 +0000 (-0800) Subject: hvc_console: fix test on unsigned in hvc_console_print() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ecfcbee729389bc47576695c529d351d60946ca7;p=linux-beck.git hvc_console: fix test on unsigned in hvc_console_print() vtermnos[] is unsigned, so this test was wrong. Signed-off-by: Roel Kluin Cc: Benjamin Herrenschmidt Cc: Hendrik Brueckner Cc: Christian Borntraeger Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index 4c3b59be286a..465185fc0f52 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) {