Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[powerpc.git] / drivers / serial / amba-pl010.c
index 61db697..f69bd09 100644 (file)
@@ -589,6 +589,8 @@ static int __init pl010_console_setup(struct console *co, char *options)
         */
        if (co->index >= UART_NR)
                co->index = 0;
+       if (!amba_ports[co->index])
+               return -ENODEV;
        port = &amba_ports[co->index]->port;
 
        if (options)