Skip to content

Commit 75bda95

Browse files
npigginmpe
authored andcommitted
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 <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent ea47dd1 commit 75bda95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/kernel/setup-common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
256256
seq_printf(m, "processor\t: %lu\n", cpu_id);
257257
seq_printf(m, "cpu\t\t: ");
258258

259-
if (cur_cpu_spec->pvr_mask)
259+
if (cur_cpu_spec->pvr_mask && cur_cpu_spec->cpu_name)
260260
seq_printf(m, "%s", cur_cpu_spec->cpu_name);
261261
else
262262
seq_printf(m, "unknown (%08x)", pvr);

0 commit comments

Comments
 (0)