Commit c35b49b7 authored by Qipan Li's avatar Qipan Li Committed by Greg Kroah-Hartman

serial: sirf: assign console default index if users not set a valid one

it seems this is a more typical behaviour from reviewing other console
drivers.
Signed-off-by: default avatarQipan Li <Qipan.Li@csr.com>
Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7f60f2fe
...@@ -1236,7 +1236,7 @@ sirfsoc_uart_console_setup(struct console *co, char *options) ...@@ -1236,7 +1236,7 @@ sirfsoc_uart_console_setup(struct console *co, char *options)
struct sirfsoc_uart_port *sirfport; struct sirfsoc_uart_port *sirfport;
struct sirfsoc_register *ureg; struct sirfsoc_register *ureg;
if (co->index < 0 || co->index >= SIRFSOC_UART_NR) if (co->index < 0 || co->index >= SIRFSOC_UART_NR)
return -EINVAL; co->index = 1;
sirfport = sirf_ports[co->index]; sirfport = sirf_ports[co->index];
if (!sirfport) if (!sirfport)
return -ENODEV; return -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment