hvc_console: fix test on unsigned in hvc_console_print()
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 9 Dec 2009 20:34:16 +0000 (12:34 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 2 Mar 2010 22:43:13 +0000 (14:43 -0800)
vtermnos[] is unsigned, so this test was wrong.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/hvc_console.c

index 4c3b59be286add18bcf32b500ff84d8a4f88c36a..465185fc0f524bb2eb15cc4d3cf251af264a48ae 100644 (file)
@@ -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) {