diff options
Diffstat (limited to 'arch/arm/kernel/perf_event_cpu.c')
-rw-r--r-- | arch/arm/kernel/perf_event_cpu.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c index 213919ba326f..3b8c2833c537 100644 --- a/arch/arm/kernel/perf_event_cpu.c +++ b/arch/arm/kernel/perf_event_cpu.c | |||
@@ -304,16 +304,17 @@ static int probe_current_pmu(struct arm_pmu *pmu) | |||
304 | static int of_pmu_irq_cfg(struct platform_device *pdev) | 304 | static int of_pmu_irq_cfg(struct platform_device *pdev) |
305 | { | 305 | { |
306 | int i, irq; | 306 | int i, irq; |
307 | int *irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL); | 307 | int *irqs; |
308 | |||
309 | if (!irqs) | ||
310 | return -ENOMEM; | ||
311 | 308 | ||
312 | /* Don't bother with PPIs; they're already affine */ | 309 | /* Don't bother with PPIs; they're already affine */ |
313 | irq = platform_get_irq(pdev, 0); | 310 | irq = platform_get_irq(pdev, 0); |
314 | if (irq >= 0 && irq_is_percpu(irq)) | 311 | if (irq >= 0 && irq_is_percpu(irq)) |
315 | return 0; | 312 | return 0; |
316 | 313 | ||
314 | irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL); | ||
315 | if (!irqs) | ||
316 | return -ENOMEM; | ||
317 | |||
317 | for (i = 0; i < pdev->num_resources; ++i) { | 318 | for (i = 0; i < pdev->num_resources; ++i) { |
318 | struct device_node *dn; | 319 | struct device_node *dn; |
319 | int cpu; | 320 | int cpu; |