aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-05-09 13:17:08 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2017-05-09 22:56:03 +1000
commit75bda95048a4d2c5ff04036bd0181bc84085d8b2 (patch)
tree76640ad23f31cf1fc90623dc56058836f6247c1f /arch/powerpc
parentof/fdt: introduce of_scan_flat_dt_subnodes and of_get_flat_dt_phandle (diff)
downloadlinux-dev-75bda95048a4d2c5ff04036bd0181bc84085d8b2.tar.xz
linux-dev-75bda95048a4d2c5ff04036bd0181bc84085d8b2.zip
powerpc: Don't print cpu_spec->cpu_name if it's NULL
Currently we assume that if the cpu_spec has a pvr_mask then it must also have a cpu_name. But that will change in a subsequent commit when we do CPU feature discovery via the device tree, so check explicitly if cpu_name is NULL. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/setup-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 5c10b5925ac2..b57df7fc9e5f 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -256,7 +256,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_printf(m, "processor\t: %lu\n", cpu_id);
seq_printf(m, "cpu\t\t: ");
- if (cur_cpu_spec->pvr_mask)
+ if (cur_cpu_spec->pvr_mask && cur_cpu_spec->cpu_name)
seq_printf(m, "%s", cur_cpu_spec->cpu_name);
else
seq_printf(m, "unknown (%08x)", pvr);