Merge branch 'topic/cleanup' into for-linus
[pandora-kernel.git] / arch / powerpc / kernel / power6-pmu.c
index 09ae5bf..fa21890 100644 (file)
@@ -537,7 +537,8 @@ static struct power_pmu power6_pmu = {
 
 static int init_power6_pmu(void)
 {
-       if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power6"))
+       if (!cur_cpu_spec->oprofile_cpu_type ||
+           strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power6"))
                return -ENODEV;
 
        return register_power_pmu(&power6_pmu);