Merge tag 'tty-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
[linux-2.6-microblaze.git] / drivers / of / fdt.c
index d170c88..7bc9292 100644 (file)
@@ -1024,6 +1024,7 @@ int __init early_init_dt_scan_chosen_stdout(void)
        int l;
        const struct earlycon_id *match;
        const void *fdt = initial_boot_params;
+       int ret;
 
        offset = fdt_path_offset(fdt, "/chosen");
        if (offset < 0)
@@ -1056,7 +1057,8 @@ int __init early_init_dt_scan_chosen_stdout(void)
                if (fdt_node_check_compatible(fdt, offset, match->compatible))
                        continue;
 
-               if (of_setup_earlycon(match, offset, options) == 0)
+               ret = of_setup_earlycon(match, offset, options);
+               if (!ret || ret == -EALREADY)
                        return 0;
        }
        return -ENODEV;