summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.com>2020-08-04 16:27:43 +0200
committerPetr Mladek <pmladek@suse.com>2020-08-04 16:27:43 +0200
commit57e60db3bc4d2755aefe5abd1024662f478770ac (patch)
tree8ef1fd13a622567bc3867fc37874780650a7a97e /kernel
parent30d497a0e1aadd904867081246c310dd0284eb41 (diff)
parent6f2fdb298bf8e3207d060d57f2565b13d9300d2f (diff)
Merge branch 'for-5.9-console-return-codes' into for-linus
Diffstat (limited to 'kernel')
-rw-r--r--kernel/printk/printk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 5f6eca65dd9a..4f1dae73e1bc 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2676,7 +2676,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];
@@ -2699,8 +2699,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) {
@@ -2713,7 +2713,7 @@ static int try_enable_new_console(struct console *newcon, bool user_specified)
/*
* Some consoles, such as pstore and netconsole, can be enabled even
* without matching. Accept the pre-enabled consoles only when match()
- * and setup() had a change to be called.
+ * and setup() had a chance to be called.
*/
if (newcon->flags & CON_ENABLED && c->user_specified == user_specified)
return 0;