Merge branch 'for-5.9-console-return-codes' into for-linus
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user