linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sh: sh-sci: Check initialization for earlyprintk
@ 2011-03-28  2:34 Nobuhiro Iwamatsu
  2011-03-28  3:45 ` Yoshihiro Shimoda
  0 siblings, 1 reply; 2+ messages in thread
From: Nobuhiro Iwamatsu @ 2011-03-28  2:34 UTC (permalink / raw)
  To: linux-sh

When user do not set earlyprink, initialization is performed in the state
that setting is not performed. In this case sh-sci does not work.
This checks the initialization.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
 drivers/tty/serial/sh-sci.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index eb7958c..cc4c329 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1836,6 +1836,9 @@ static int __devinit serial_console_setup(struct console *co, char *options)
 	sci_port = &sci_ports[co->index];
 	port = &sci_port->port;
 
+	if (port->ops = NULL)
+		return -ENODEV;
+
 	ret = sci_remap_port(port);
 	if (unlikely(ret != 0))
 		return ret;
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-28  3:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28  2:34 [PATCH] sh: sh-sci: Check initialization for earlyprintk Nobuhiro Iwamatsu
2011-03-28  3:45 ` Yoshihiro Shimoda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).