From: Liang He <windhl@126.com>
To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com
Cc: jgg@ziepe.ca, kirill.shutemov@linux.intel.com,
brijesh.singh@amd.com, linux-kernel@vger.kernel.org,
windhl@126.com
Subject: [PATCH] arch: x86: kernel: Add missing of_node_put() in x86_init.c
Date: Wed, 15 Jun 2022 20:57:39 +0800 [thread overview]
Message-ID: <20220615125739.3966617-1-windhl@126.com> (raw)
In x86_wallclock_init(), we need to use of_node_put() for the
of_find_matching_node() which returns a node pointer with refcount
incremented.
Signed-off-by: Liang He <windhl@126.com>
---
arch/x86/kernel/x86_init.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
index e84ee5cdbd8c..81c071080efe 100644
--- a/arch/x86/kernel/x86_init.c
+++ b/arch/x86/kernel/x86_init.c
@@ -50,6 +50,7 @@ static __init void x86_wallclock_init(void)
struct device_node *node = of_find_matching_node(NULL, of_cmos_match);
if (node && !of_device_is_available(node)) {
+ of_node_put(node);
x86_platform.get_wallclock = get_rtc_noop;
x86_platform.set_wallclock = set_rtc_noop;
}
--
2.25.1
next reply other threads:[~2022-06-15 12:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 12:57 Liang He [this message]
2022-10-17 13:56 ` Thomas Gleixner
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=20220615125739.3966617-1-windhl@126.com \
--to=windhl@126.com \
--cc=bp@alien8.de \
--cc=brijesh.singh@amd.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jgg@ziepe.ca \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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®