aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKefeng Wang <[email protected]>2017-05-16 15:36:16 +0800
committerWill Deacon <[email protected]>2017-05-30 11:07:42 +0100
commit690e95dd4d67be2eb905e1480b692c84e612a71a (patch)
treee2f9c808fee06835c52e2f19866e40e23087527d
parent3fde2999fac549024a56353966844ac7633b74ae (diff)
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 <[email protected]> Signed-off-by: Kefeng Wang <[email protected]> Signed-off-by: Will Deacon <[email protected]>
-rw-r--r--arch/arm64/kernel/setup.c3
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);
}