aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/power4-pmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/power4-pmu.c')
-rw-r--r--arch/powerpc/kernel/power4-pmu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/power4-pmu.c b/arch/powerpc/kernel/power4-pmu.c
index db90b0c5c27b..3c90a3d9173e 100644
--- a/arch/powerpc/kernel/power4-pmu.c
+++ b/arch/powerpc/kernel/power4-pmu.c
@@ -606,7 +606,8 @@ static struct power_pmu power4_pmu = {
606 606
607static int init_power4_pmu(void) 607static int init_power4_pmu(void)
608{ 608{
609 if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power4")) 609 if (!cur_cpu_spec->oprofile_cpu_type ||
610 strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power4"))
610 return -ENODEV; 611 return -ENODEV;
611 612
612 return register_power_pmu(&power4_pmu); 613 return register_power_pmu(&power4_pmu);