linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drivers/perf: arm_pmu: Fix leak in error path
@ 2016-08-27 16:19 Stefan Wahren
  2016-08-27 16:19 ` [PATCH 2/2] drivers/perf: arm_pmu: Fix NULL pointer dereference during probe Stefan Wahren
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Wahren @ 2016-08-27 16:19 UTC (permalink / raw)
  To: linux-arm-kernel

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")
---
 drivers/perf/arm_pmu.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c
index c494613..1b48bf0 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)
 			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;
 			}
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-01  2:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-27 16:19 [PATCH 1/2] drivers/perf: arm_pmu: Fix leak in error path Stefan Wahren
2016-08-27 16:19 ` [PATCH 2/2] drivers/perf: arm_pmu: Fix NULL pointer dereference during probe Stefan Wahren
2016-08-30 11:27   ` Will Deacon
2016-09-01  2:17     ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).