From: Andy Shevchenko Date: Thu, 18 Jun 2020 16:47:47 +0000 (+0300) Subject: serial: sunsab: Return proper error code from console ->setup() hook X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f85956b7a29d39745d16ebb6fb81c663018beab1;p=linux.git serial: sunsab: Return proper error code from console ->setup() hook For unifying console ->setup() handling, which is poorly documented, return error code, rather than non-zero arbitrary number. Signed-off-by: Andy Shevchenko Reviewed-by: Petr Mladek Acked-by: David S. Miller Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200618164751.56828-3-andriy.shevchenko@linux.intel.com --- diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c index 1eb703c980e05..bab551f469631 100644 --- a/drivers/tty/serial/sunsab.c +++ b/drivers/tty/serial/sunsab.c @@ -886,7 +886,7 @@ static int sunsab_console_setup(struct console *con, char *options) * though... */ if (up->port.type != PORT_SUNSAB) - return -1; + return -EINVAL; printk("Console: ttyS%d (SAB82532)\n", (sunsab_reg.minor - 64) + con->index);