From: Liang He <windhl@126.com>
To: tglx@linutronix.de, maz@kernel.org, linux-kernel@vger.kernel.org,
windhl@126.com
Subject: [PATCH] irqchip: Add missing of_ndoe_get() in its_of_probe()
Date: Wed, 22 Jun 2022 14:21:38 +0800 [thread overview]
Message-ID: <20220622062138.4095598-1-windhl@126.com> (raw)
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
next reply other threads:[~2022-06-22 6:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 6:21 Liang He [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220622062138.4095598-1-windhl@126.com \
--to=windhl@126.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®