linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 09/13] serial: earlycon: Ignore parse_options() error code
Date: Sun,  1 Mar 2015 11:05:54 -0500	[thread overview]
Message-ID: <1425225958-17908-10-git-send-email-peter@hurleysoftware.com> (raw)
In-Reply-To: <1425225958-17908-1-git-send-email-peter@hurleysoftware.com>

Because setup_earlycon() continues to attempt console registration
if an error occurred parsing the option string, the actual value of
the error code from parse_options() is ignored.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
 drivers/tty/serial/earlycon.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index 0480c8f..da5e8c8 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -114,9 +114,8 @@ int __init setup_earlycon(char *buf, const char *match,
 
 	buf += len + 1;
 
-	err = parse_options(&early_console_dev, buf);
 	/* On parsing error, pass the options buf to the setup function */
-	if (!err)
+	if (!parse_options(&early_console_dev, buf))
 		buf = NULL;
 
 	port->uartclk = BASE_BAUD * 16;
-- 
2.3.0

  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 ` [PATCH v2 -next 08/13] serial: 8250_early: Fix setup() error code Peter Hurley
2015-03-01 16:05 ` Peter Hurley [this message]
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-10-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).