]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arm64: check return value of of_flat_dt_get_machine_name
authorKefeng Wang <wangkefeng.wang@huawei.com>
Tue, 16 May 2017 07:36:16 +0000 (15:36 +0800)
committerWill Deacon <will.deacon@arm.com>
Tue, 30 May 2017 10:07:42 +0000 (11:07 +0100)
It's useless to print machine name and setup arch-specific system
identifiers if of_flat_dt_get_machine_name() return NULL, especially
when ACPI-based boot.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/setup.c

index 2c822ef94f341417624fa6c89253b98e77229875..d4b740538ad57430d57854e58bd257dde366933b 100644 (file)
@@ -194,6 +194,9 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)
        }
 
        name = of_flat_dt_get_machine_name();
+       if (!name)
+               return;
+
        pr_info("Machine model: %s\n", name);
        dump_stack_set_arch_desc("%s (DT)", name);
 }