diff options
author | Kefeng Wang <wangkefeng.wang@huawei.com> | 2017-05-16 15:36:16 +0800 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-05-30 11:07:42 +0100 |
commit | 690e95dd4d67be2eb905e1480b692c84e612a71a (patch) | |
tree | e2f9c808fee06835c52e2f19866e40e23087527d /arch/arm64/kernel/setup.c | |
parent | 3fde2999fac549024a56353966844ac7633b74ae (diff) | |
download | talos-obmc-linux-690e95dd4d67be2eb905e1480b692c84e612a71a.tar.gz talos-obmc-linux-690e95dd4d67be2eb905e1480b692c84e612a71a.zip |
arm64: check return value of of_flat_dt_get_machine_name
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>
Diffstat (limited to 'arch/arm64/kernel/setup.c')
-rw-r--r-- | arch/arm64/kernel/setup.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 2c822ef94f34..d4b740538ad5 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -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); } |