diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-06-18 18:47:49 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2020-06-25 14:23:06 +0200 |
commit | 9f02842759d8fa4444cd494f847cbe283e3b5815 (patch) | |
tree | 3978ad4e456b28d4e7831f42a6c87b62d3615381 | |
parent | serial: sunzilog: Return proper error code from console ->setup() hook (diff) | |
download | linux-9f02842759d8fa4444cd494f847cbe283e3b5815.tar.xz linux-9f02842759d8fa4444cd494f847cbe283e3b5815.zip |
tty: hvc: 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>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20200618164751.56828-5-andriy.shevchenko@linux.intel.com
-rw-r--r-- | drivers/tty/hvc/hvsi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/hvc/hvsi.c b/drivers/tty/hvc/hvsi.c index 66f95f758be0..e8c58f9bd263 100644 --- a/drivers/tty/hvc/hvsi.c +++ b/drivers/tty/hvc/hvsi.c @@ -1128,7 +1128,7 @@ static int __init hvsi_console_setup(struct console *console, char *options) int ret; if (console->index < 0 || console->index >= hvsi_count) - return -1; + return -EINVAL; hp = &hvsi_ports[console->index]; /* give the FSP a chance to change the baud rate when we re-open */ |