diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-06-18 19:47:50 +0300 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2020-06-25 14:24:07 +0200 |
commit | bba18a1af33e0f0a1ad7d028208b306ef3f3df12 (patch) | |
tree | 40469f0d99966db0bfce06266551bf6164a06012 /kernel/printk | |
parent | 9f02842759d8fa4444cd494f847cbe283e3b5815 (diff) | |
download | linux-stable-bba18a1af33e0f0a1ad7d028208b306ef3f3df12.tar.gz linux-stable-bba18a1af33e0f0a1ad7d028208b306ef3f3df12.tar.bz2 linux-stable-bba18a1af33e0f0a1ad7d028208b306ef3f3df12.zip |
console: Propagate error code from console ->setup()
Since console ->setup() hook returns meaningful error codes,
propagate it to the caller of try_enable_new_console().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20200618164751.56828-6-andriy.shevchenko@linux.intel.com
Diffstat (limited to 'kernel/printk')
-rw-r--r-- | kernel/printk/printk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 8c14835be46c..aaea3ad182e1 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2668,7 +2668,7 @@ early_param("keep_bootcon", keep_bootcon_setup); static int try_enable_new_console(struct console *newcon, bool user_specified) { struct console_cmdline *c; - int i; + int i, err; for (i = 0, c = console_cmdline; i < MAX_CMDLINECONSOLES && c->name[0]; @@ -2691,8 +2691,8 @@ static int try_enable_new_console(struct console *newcon, bool user_specified) return 0; if (newcon->setup && - newcon->setup(newcon, c->options) != 0) - return -EIO; + (err = newcon->setup(newcon, c->options)) != 0) + return err; } newcon->flags |= CON_ENABLED; if (i == preferred_console) { |