aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/sh-sci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/sh-sci.c')
-rw-r--r--drivers/tty/serial/sh-sci.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index eb7958c675a8..264209c32675 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1836,6 +1836,12 @@ static int __devinit serial_console_setup(struct console *co, char *options)
1836 sci_port = &sci_ports[co->index]; 1836 sci_port = &sci_ports[co->index];
1837 port = &sci_port->port; 1837 port = &sci_port->port;
1838 1838
1839 /*
1840 * Refuse to handle uninitialized ports.
1841 */
1842 if (!port->ops)
1843 return -ENODEV;
1844
1839 ret = sci_remap_port(port); 1845 ret = sci_remap_port(port);
1840 if (unlikely(ret != 0)) 1846 if (unlikely(ret != 0))
1841 return ret; 1847 return ret;