serial: earlycon: Ignore parse_options() error code
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 9 Mar 2015 20:27:18 +0000 (16:27 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 15:17:56 +0000 (16:17 +0100)
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.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/earlycon.c

index 0480c8f24cbbd621756bac399ff821b5d03378c3..da5e8c8c4ad4ff122f56e246431aeb7517f15747 100644 (file)
@@ -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;