aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/kernel/perf_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/perf_event.c')
-rw-r--r--arch/arm/kernel/perf_event.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c
index 1a0d6afbb35..a734311f7a0 100644
--- a/arch/arm/kernel/perf_event.c
+++ b/arch/arm/kernel/perf_event.c
@@ -426,7 +426,7 @@ armpmu_reserve_hardware(void)
pr_warning("unable to request IRQ%d for ARM perf "
"counters\n", irq);
break;
- } else if (plat->enable_irq)
+ } else if (plat && plat->enable_irq)
plat->enable_irq(irq);
}
@@ -434,7 +434,7 @@ armpmu_reserve_hardware(void)
for (i = i - 1; i >= 0; --i) {
irq = platform_get_irq(pmu_device, i);
if (irq >= 0) {
- if (plat->disable_irq)
+ if (plat && plat->disable_irq)
plat->disable_irq(irq);
free_irq(irq, NULL);
}
@@ -456,7 +456,7 @@ armpmu_release_hardware(void)
for (i = pmu_device->num_resources - 1; i >= 0; --i) {
irq = platform_get_irq(pmu_device, i);
if (irq >= 0) {
- if (plat->disable_irq)
+ if (plat && plat->disable_irq)
plat->disable_irq(irq);
free_irq(irq, NULL);
}