]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/of/fdt.c
earlycon: Use a pointer table to fix __earlycon_table stride
[mirror_ubuntu-bionic-kernel.git] / drivers / of / fdt.c
index 4675e5ac4d11a7600377ecfc42edf719c55c0be3..212d29922d72d87ccf28cf2fe71752ca8c1e0f2b 100644 (file)
@@ -944,7 +944,7 @@ int __init early_init_dt_scan_chosen_stdout(void)
        int offset;
        const char *p, *q, *options = NULL;
        int l;
-       const struct earlycon_id *match;
+       const struct earlycon_id **p_match;
        const void *fdt = initial_boot_params;
 
        offset = fdt_path_offset(fdt, "/chosen");
@@ -971,7 +971,10 @@ int __init early_init_dt_scan_chosen_stdout(void)
                return 0;
        }
 
-       for (match = __earlycon_table; match < __earlycon_table_end; match++) {
+       for (p_match = __earlycon_table; p_match < __earlycon_table_end;
+            p_match++) {
+               const struct earlycon_id *match = *p_match;
+
                if (!match->compatible[0])
                        continue;