summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorShannon Zhao <shannon.zhao@linaro.org>2015-06-29 11:02:40 +0300
committerCatalin Marinas <catalin.marinas@arm.com>2015-06-30 20:13:05 +0300
commitb265da5a45ce60bd3d7505cc0eaa6cfba50946a1 (patch)
tree2fb8f58816d762241dcbc9120fad40e32b4a8c43 /arch
parent18a11b5e79697ddc61e30181737c91ce21eaa859 (diff)
downloadlinux-b265da5a45ce60bd3d7505cc0eaa6cfba50946a1.tar.xz
arm64: perf: fix unassigned cpu_pmu->plat_device when probing PMU PPIs
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/kernel/perf_event.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c
index 8af7784a8e35..b31e9a4b6275 100644
--- a/arch/arm64/kernel/perf_event.c
+++ b/arch/arm64/kernel/perf_event.c
@@ -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;
}