Merge branch 'for-5.8' into for-linus
authorPetr Mladek <pmladek@suse.com>
Mon, 1 Jun 2020 08:15:16 +0000 (10:15 +0200)
committerPetr Mladek <pmladek@suse.com>
Mon, 1 Jun 2020 08:15:16 +0000 (10:15 +0200)
1  2 
include/linux/console.h
kernel/printk/printk.c

Simple merge
@@@ -2708,16 -2685,17 +2746,15 @@@ static int try_enable_new_console(struc
   */
  void register_console(struct console *newcon)
  {
 -      int i;
        unsigned long flags;
        struct console *bcon = NULL;
 -      struct console_cmdline *c;
 -      static bool has_preferred;
 +      int err;
  
-       if (console_drivers)
-               for_each_console(bcon)
-                       if (WARN(bcon == newcon,
-                                       "console '%s%d' already registered\n",
-                                       bcon->name, bcon->index))
-                               return;
+       for_each_console(bcon) {
+               if (WARN(bcon == newcon, "console '%s%d' already registered\n",
+                                        bcon->name, bcon->index))
+                       return;
+       }
  
        /*
         * before we register a new CON_BOOT console, make sure we don't