Merge branch 'core-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / arch / powerpc / kernel / power4-pmu.c
index db90b0c..3c90a3d 100644 (file)
@@ -606,7 +606,8 @@ static struct power_pmu power4_pmu = {
 
 static int init_power4_pmu(void)
 {
-       if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power4"))
+       if (!cur_cpu_spec->oprofile_cpu_type ||
+           strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power4"))
                return -ENODEV;
 
        return register_power_pmu(&power4_pmu);