Skip to content

Commit

Permalink
arm64: check return value of of_flat_dt_get_machine_name
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kefeng Wang authored and Will Deacon committed May 30, 2017
1 parent 3fde299 commit 690e95d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/arm64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 690e95d

Please sign in to comment.