]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/serial/8250.c
serial8250: sanity check nr_uarts on all paths.
[linux-2.6-omap-h63xx.git] / drivers / serial / 8250.c
index 1bc00b721e9dac70693f20b85c4f72776f214eb2..be95e55b228b83077ace9af42764d75f8a286d11 100644 (file)
@@ -2623,6 +2623,9 @@ static struct console serial8250_console = {
 
 static int __init serial8250_console_init(void)
 {
+       if (nr_uarts > UART_NR)
+               nr_uarts = UART_NR;
+
        serial8250_isa_init_ports();
        register_console(&serial8250_console);
        return 0;