linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] irqchip: Fix refcount leak bug in irq-ls-extirq.c
@ 2022-06-18  7:28 Liang He
  0 siblings, 0 replies; only message in thread
From: Liang He @ 2022-06-18  7:28 UTC (permalink / raw)
  To: tglx, maz; +Cc: windhl, linux-kernel

In ls_extirq_parse_map(), we need to keep refcount balance in the
'while' loop. For each of_find_node_by_phandle(), we need a paired
of_node_put().

Signed-off-by: Liang He <windhl@126.com>
---
 drivers/irqchip/irq-ls-extirq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/irqchip/irq-ls-extirq.c b/drivers/irqchip/irq-ls-extirq.c
index 853b3972dbe7..82fffa37ee86 100644
--- a/drivers/irqchip/irq-ls-extirq.c
+++ b/drivers/irqchip/irq-ls-extirq.c
@@ -126,6 +126,7 @@ ls_extirq_parse_map(struct ls_extirq_data *priv, struct device_node *node)
 			return -EINVAL;
 		priv->map[hwirq].fwnode = &ipar->fwnode;
 		ret = of_property_read_u32(ipar, "#interrupt-cells", &intsize);
+		of_node_put(ipar);
 		if (ret)
 			return ret;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-18  7:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-18  7:28 [PATCH] irqchip: Fix refcount leak bug in irq-ls-extirq.c Liang He

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).