All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqchip: Add missing of_ndoe_get() in its_of_probe()
@ 2022-06-22  6:21 Liang He
  2022-06-22  8:03 ` Marc Zyngier
  2022-06-22  9:02 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 7+ messages in thread
From: Liang He @ 2022-06-22  6:21 UTC (permalink / raw)
  To: tglx, maz, linux-kernel, windhl

We need to add missing of_node_get() for of_find_matching_node() to
keep refcount balance.

Note: of_find_matching_node() will decrease the refcount of its first
arg.

Signed-off-by: Liang He <windhl@126.com>
---
 drivers/irqchip/irq-gic-v3-its.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 5ff09de6c48f..829893cc5e10 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -5309,6 +5309,7 @@ static int __init its_of_probe(struct device_node *node)
 	 * reset, don't even try to go any further, as this could
 	 * result in something even worse.
 	 */
+	of_node_get(node);
 	for (np = of_find_matching_node(node, its_device_id); np;
 	     np = of_find_matching_node(np, its_device_id)) {
 		int err;
@@ -5323,6 +5324,7 @@ static int __init its_of_probe(struct device_node *node)
 			return err;
 	}
 
+	of_node_get(node);
 	for (np = of_find_matching_node(node, its_device_id); np;
 	     np = of_find_matching_node(np, its_device_id)) {
 		if (!of_device_is_available(np))
-- 
2.25.1


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

end of thread, other threads:[~2022-06-22  9:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-22  6:21 [PATCH] irqchip: Add missing of_ndoe_get() in its_of_probe() Liang He
2022-06-22  8:03 ` Marc Zyngier
2022-06-22  8:15   ` Liang He
2022-06-22  8:29     ` Marc Zyngier
2022-06-22  8:34       ` Liang He
2022-06-22  9:39         ` Miaoqian Lin
2022-06-22  9:02 ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.