From: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
To: linux-sh@vger.kernel.org
Subject: [PATCH] sh: sh-sci: Check initialization for earlyprintk
Date: Mon, 28 Mar 2011 02:34:35 +0000 [thread overview]
Message-ID: <1301279675-16519-1-git-send-email-iwamatsu@nigauri.org> (raw)
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
next reply other threads:[~2011-03-28 2:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-28 2:34 Nobuhiro Iwamatsu [this message]
2011-03-28 3:45 ` [PATCH] sh: sh-sci: Check initialization for earlyprintk Yoshihiro Shimoda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1301279675-16519-1-git-send-email-iwamatsu@nigauri.org \
--to=iwamatsu@nigauri.org \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).