lkml.org 
[lkml]   [2022]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] irqchip: Fix refcount leak bug in irq-ls-extirq.c
Date
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
\
 
 \ /
  Last update: 2022-06-18 09:29    [W:0.050 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site