From: Liang He <windhl@126.com>
To: tsbogend@alpha.franken.de, linux-mips@vger.kernel.org, windhl@126.com
Subject: [PATCH v2] mips: lantiq: Add missing of_node_put() in irq.c
Date: Tue, 21 Jun 2022 23:41:25 +0800 [thread overview]
Message-ID: <20220621154125.4084010-1-windhl@126.com> (raw)
In icu_of_init(), of_find_compatible_node() will return a node
pointer with refcount incremented. We should use of_node_put()
when it is not used anymore.
Signed-off-by: Liang He <windhl@126.com>
---
changelog:
v2: fix bug intro-ed by v1, only one put needed.
v1: add missing of_node_put()
arch/mips/lantiq/irq.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c
index b732495f138a..20622bf0a9b3 100644
--- a/arch/mips/lantiq/irq.c
+++ b/arch/mips/lantiq/irq.c
@@ -408,6 +408,7 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent)
if (!ltq_eiu_membase)
panic("Failed to remap eiu memory");
}
+ of_node_put(eiu_node);
return 0;
}
--
2.25.1
next reply other threads:[~2022-06-21 15:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 15:41 Liang He [this message]
2022-06-22 7:55 ` [PATCH v2] mips: lantiq: Add missing of_node_put() in irq.c Thomas Bogendoerfer
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=20220621154125.4084010-1-windhl@126.com \
--to=windhl@126.com \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.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