]> git.baikalelectronics.ru Git - kernel.git/commit
serial: 8250_early: Fix setup() error code
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 9 Mar 2015 20:27:17 +0000 (16:27 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 15:17:55 +0000 (16:17 +0100)
commit1c900b0ed8852b22c4b987917ef52738aaaeff52
tree3ef3dfeaafeada0b1c859b6ebb386aaa78826c11
parent00941646d83903773a35c593c71549f858b19627
serial: 8250_early: Fix setup() error code

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.

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/8250/8250_early.c