From: Wan Jiabing <wanjiabing@vivo.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>, Rob Herring <robh@kernel.org>,
Thiago Jung Bauermann <bauerman@linux.ibm.com>,
Lakshmi Ramasubramanian <nramas@linux.microsoft.com>,
Hari Bathini <hbathini@linux.ibm.com>,
Wan Jiabing <wanjiabing@vivo.com>,
Sourabh Jain <sourabhjain@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Cc: kael_w@yeah.net
Subject: [PATCH] powerpc/kexec_file: Add of_node_put() before goto
Date: Sun, 17 Oct 2021 21:54:16 -0400 [thread overview]
Message-ID: <20211018015418.10182-1-wanjiabing@vivo.com> (raw)
Fix following coccicheck warning:
./arch/powerpc/kexec/file_load_64.c:698:1-22: WARNING: Function
for_each_node_by_type should have of_node_put() before goto
Early exits from for_each_node_by_type should decrement the
node reference counter.
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
arch/powerpc/kexec/file_load_64.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kexec/file_load_64.c b/arch/powerpc/kexec/file_load_64.c
index 5056e175ca2c..b4981b651d9a 100644
--- a/arch/powerpc/kexec/file_load_64.c
+++ b/arch/powerpc/kexec/file_load_64.c
@@ -700,6 +700,7 @@ static int update_usable_mem_fdt(void *fdt, struct crash_mem *usable_mem)
if (ret) {
pr_err("Failed to set linux,usable-memory property for %s node",
dn->full_name);
+ of_node_put(dn);
goto out;
}
}
--
2.20.1
next reply other threads:[~2021-10-18 1:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 1:54 Wan Jiabing [this message]
2021-10-18 7:07 ` [PATCH] powerpc/kexec_file: Add of_node_put() before goto Hari Bathini
2021-11-02 10:11 ` Michael Ellerman
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=20211018015418.10182-1-wanjiabing@vivo.com \
--to=wanjiabing@vivo.com \
--cc=bauerman@linux.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=hbathini@linux.ibm.com \
--cc=kael_w@yeah.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=nramas@linux.microsoft.com \
--cc=paulus@samba.org \
--cc=robh@kernel.org \
--cc=sourabhjain@linux.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).