summaryrefslogtreecommitdiffstats
path: root/drivers/perf
diff options
context:
space:
mode:
authorStefan Wahren <stefan.wahren@i2se.com>2016-08-27 12:19:49 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2016-09-02 12:17:52 -0400
commit753246840d012ae34ea80a1d40bc1546c62fb957 (patch)
tree9032a7087e72e8f76d0306b8f8f21ca11afb6117 /drivers/perf
parent3eab887a55424fc2c27553b7bfe32330df83f7b8 (diff)
drivers/perf: arm_pmu: Fix leak in error path
In case of a IRQ type mismatch in of_pmu_irq_cfg() the device node for interrupt affinity isn't freed. So fix this issue by calling of_node_put(). Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Fixes: fa8ad7889d83 ("arm: perf: factor arm_pmu core out to drivers") Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'drivers/perf')
-rw-r--r--drivers/perf/arm_pmu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c
index c494613c1909..1b48bf0a6780 100644
--- a/drivers/perf/arm_pmu.c
+++ b/drivers/perf/arm_pmu.c
@@ -925,6 +925,7 @@ static int of_pmu_irq_cfg(struct arm_pmu *pmu)
925 if (i > 0 && spi != using_spi) { 925 if (i > 0 && spi != using_spi) {
926 pr_err("PPI/SPI IRQ type mismatch for %s!\n", 926 pr_err("PPI/SPI IRQ type mismatch for %s!\n",
927 dn->name); 927 dn->name);
928 of_node_put(dn);
928 kfree(irqs); 929 kfree(irqs);
929 return -EINVAL; 930 return -EINVAL;
930 } 931 }