* [PATCH] powerpc/44x/fsp2: Add missing of_node_put in node_irq_request
@ 2021-11-01 9:44 He Ying
0 siblings, 0 replies; only message in thread
From: He Ying @ 2021-11-01 9:44 UTC (permalink / raw
To: mpe, benh, paulus; +Cc: linuxppc-dev, linux-kernel
Early exits from for_each_compatible_node() should decrement the
node reference counter.
Signed-off-by: He Ying <heying24@huawei.com>
---
arch/powerpc/platforms/44x/fsp2.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/platforms/44x/fsp2.c b/arch/powerpc/platforms/44x/fsp2.c
index b299e43f5ef9..823397c802de 100644
--- a/arch/powerpc/platforms/44x/fsp2.c
+++ b/arch/powerpc/platforms/44x/fsp2.c
@@ -208,6 +208,7 @@ static void node_irq_request(const char *compat, irq_handler_t errirq_handler)
if (irq == NO_IRQ) {
pr_err("device tree node %pOFn is missing a interrupt",
np);
+ of_node_put(np);
return;
}
@@ -215,6 +216,7 @@ static void node_irq_request(const char *compat, irq_handler_t errirq_handler)
if (rc) {
pr_err("fsp_of_probe: request_irq failed: np=%pOF rc=%d",
np, rc);
+ of_node_put(np);
return;
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-01 9:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-01 9:44 [PATCH] powerpc/44x/fsp2: Add missing of_node_put in node_irq_request He Ying
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 read-only IMAP folder(s) and NNTP newsgroup(s).