diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-06-18 19:47:48 +0300 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2020-06-25 15:22:17 +0300 |
commit | 8629d2744d888cc31cb0ad14c9f222c14165f75e (patch) | |
tree | 240bd0b41603cf50ea11bfd038d89bdcf9165e62 /drivers | |
parent | f85956b7a29d39745d16ebb6fb81c663018beab1 (diff) | |
download | linux-8629d2744d888cc31cb0ad14c9f222c14165f75e.tar.xz |
serial: sunzilog: 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 <andriy.shevchenko@linux.intel.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20200618164751.56828-4-andriy.shevchenko@linux.intel.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tty/serial/sunzilog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/sunzilog.c b/drivers/tty/serial/sunzilog.c index 103ab8c556e7..7ea06bbc6197 100644 --- a/drivers/tty/serial/sunzilog.c +++ b/drivers/tty/serial/sunzilog.c @@ -1221,7 +1221,7 @@ static int __init sunzilog_console_setup(struct console *con, char *options) int baud, brg; if (up->port.type != PORT_SUNZILOG) - return -1; + return -EINVAL; printk(KERN_INFO "Console: ttyS%d (SunZilog zs%d)\n", (sunzilog_reg.minor - 64) + con->index, con->index); |