ARM: 7185/1: perf: don't assign platform_device on unsupported CPUs
[deliverable/linux.git] / arch / arm / kernel / perf_event.c
index 8e9c98edc0682a8aa23790737a3b63b08dea847f..88b0941ce51ec674bbf46d604fcbb46f5dc25255 100644 (file)
@@ -640,6 +640,9 @@ static struct platform_device_id armpmu_plat_device_ids[] = {
 
 static int __devinit armpmu_device_probe(struct platform_device *pdev)
 {
+       if (!cpu_pmu)
+               return -ENODEV;
+
        cpu_pmu->plat_device = pdev;
        return 0;
 }
This page took 0.02587 seconds and 5 git commands to generate.