diff options
author | Stefan Wahren <stefan.wahren@i2se.com> | 2016-08-27 16:19:49 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-07 15:23:41 +0200 |
commit | 2b86bd6a16074544a477410cd5d390b9b3e72958 (patch) | |
tree | afad16c0d4d586a84241988ae6e79aabd6032341 /drivers/perf | |
parent | 8996a69c0ebe0e38af254317d31625fc476a93de (diff) |
drivers/perf: arm_pmu: Fix leak in error path
commit 753246840d012ae34ea80a1d40bc1546c62fb957 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/perf')
-rw-r--r-- | drivers/perf/arm_pmu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c index be3755c973e9..8af1f900ea65 100644 --- a/drivers/perf/arm_pmu.c +++ b/drivers/perf/arm_pmu.c @@ -815,6 +815,7 @@ static int of_pmu_irq_cfg(struct arm_pmu *pmu) if (i > 0 && spi != using_spi) { pr_err("PPI/SPI IRQ type mismatch for %s!\n", dn->name); + of_node_put(dn); kfree(irqs); return -EINVAL; } |