arm64: perf: fix unassigned cpu_pmu->plat_device when probing PMU PPIs
authorShannon Zhao <shannon.zhao@linaro.org>
Mon, 29 Jun 2015 08:02:40 +0000 (09:02 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 30 Jun 2015 17:13:05 +0000 (18:13 +0100)
Commit d795ef9aa831 ("arm64: perf: don't warn about missing
interrupt-affinity property for PPIs") added a check for PPIs so that
we avoid parsing the interrupt-affinity property for these naturally
affine interrupts.

Unfortunately, this check can trigger an early (successful) return and
we will not assign the value of cpu_pmu->plat_device. This patch fixes
the issue.

Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/perf_event.c

index 8af7784a8e3505d49d62b9c626c493dbdf7b280d..b31e9a4b62754bb49aa10bcb7cd3fcead3ffac8d 100644 (file)
@@ -1318,7 +1318,7 @@ static int armpmu_device_probe(struct platform_device *pdev)
        /* Don't bother with PPIs; they're already affine */
        irq = platform_get_irq(pdev, 0);
        if (irq >= 0 && irq_is_percpu(irq))
-               return 0;
+               goto out;
 
        irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL);
        if (!irqs)
@@ -1356,6 +1356,7 @@ static int armpmu_device_probe(struct platform_device *pdev)
        else
                kfree(irqs);
 
+out:
        cpu_pmu->plat_device = pdev;
        return 0;
 }
This page took 0.03883 seconds and 5 git commands to generate.