summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/mpc7450-pmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/mpc7450-pmu.c')
-rw-r--r--arch/powerpc/kernel/mpc7450-pmu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/mpc7450-pmu.c b/arch/powerpc/kernel/mpc7450-pmu.c
index c244133c67a6..cc466d039af6 100644
--- a/arch/powerpc/kernel/mpc7450-pmu.c
+++ b/arch/powerpc/kernel/mpc7450-pmu.c
@@ -407,7 +407,8 @@ struct power_pmu mpc7450_pmu = {
static int init_mpc7450_pmu(void)
{
- if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/7450"))
+ if (!cur_cpu_spec->oprofile_cpu_type ||
+ strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/7450"))
return -ENODEV;
return register_power_pmu(&mpc7450_pmu);