diff options
Diffstat (limited to 'arch/powerpc/kernel/power6-pmu.c')
-rw-r--r-- | arch/powerpc/kernel/power6-pmu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/power6-pmu.c b/arch/powerpc/kernel/power6-pmu.c index 09ae5bf5bda7..fa21890531da 100644 --- a/arch/powerpc/kernel/power6-pmu.c +++ b/arch/powerpc/kernel/power6-pmu.c | |||
@@ -537,7 +537,8 @@ static struct power_pmu power6_pmu = { | |||
537 | 537 | ||
538 | static int init_power6_pmu(void) | 538 | static int init_power6_pmu(void) |
539 | { | 539 | { |
540 | if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power6")) | 540 | if (!cur_cpu_spec->oprofile_cpu_type || |
541 | strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power6")) | ||
541 | return -ENODEV; | 542 | return -ENODEV; |
542 | 543 | ||
543 | return register_power_pmu(&power6_pmu); | 544 | return register_power_pmu(&power6_pmu); |