From: Peter Hurley <peter@hurleysoftware.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
Rob Herring <robh@kernel.org>,
Peter Hurley <peter@hurleysoftware.com>
Subject: [PATCH v2 -next 08/13] serial: 8250_early: Fix setup() error code
Date: Sun, 1 Mar 2015 11:05:53 -0500 [thread overview]
Message-ID: <1425225958-17908-9-git-send-email-peter@hurleysoftware.com> (raw)
In-Reply-To: <1425225958-17908-1-git-send-email-peter@hurleysoftware.com>
If parsing failed to decode a valid uart addr, return -ENODEV instead
of success. Although setup_earlycon() will detect the failure anyway
(because the write() method has not been set), that behavior is not
obvious and should not be relied on.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
drivers/tty/serial/8250/8250_early.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index 1701d00..b199c10 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -146,7 +146,7 @@ static int __init early_serial8250_setup(struct earlycon_device *device,
const char *options)
{
if (!(device->port.membase || device->port.iobase))
- return 0;
+ return -ENODEV;
if (!device->baud) {
struct uart_port *port = &device->port;
--
2.3.0
next prev parent reply other threads:[~2015-03-01 16:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-01 16:05 [PATCH v2 -next 00/13] Extensible console matching & direct earlycon Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 01/13] serial: earlycon: Refactor parse_options into serial core Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 02/13] console: Preserve index after console setup() Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 03/13] console: Add extensible console matching Peter Hurley
2015-03-07 2:57 ` Greg Kroah-Hartman
2015-03-07 13:00 ` Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 04/13] serial: core: Fix kernel doc for uart_console_write() Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 05/13] serial: 8250_early: Remove early_device variable Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 06/13] serial: earlycon: Move ->uartclk initialize Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 07/13] serial: 8250_early: Assume uart already initialized if no baud option Peter Hurley
2015-03-01 16:05 ` Peter Hurley [this message]
2015-03-01 16:05 ` [PATCH v2 -next 09/13] serial: earlycon: Ignore parse_options() error code Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 10/13] serial: earlycon: Allow earlycon params with name only Peter Hurley
2015-03-05 15:46 ` Rob Herring
2015-03-05 15:53 ` Peter Hurley
2015-03-05 16:07 ` Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 11/13] serial: earlycon: Refactor earlycon registration Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 12/13] serial: earlycon: Enable earlycon without command line param Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 13/13] serial: 8250_early: Remove setup_early_serial8250_console() Peter Hurley
2015-03-05 16:11 ` [PATCH v2 -next 00/13] Extensible console matching & direct earlycon Rob Herring
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=1425225958-17908-9-git-send-email-peter@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=robh@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).