From: Hari Bathini <hbathini@linux.ibm.com>
To: Wan Jiabing <wanjiabing@vivo.com>,
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>,
Sourabh Jain <sourabhjain@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Cc: kael_w@yeah.net
Subject: Re: [PATCH] powerpc/kexec_file: Add of_node_put() before goto
Date: Mon, 18 Oct 2021 12:37:06 +0530 [thread overview]
Message-ID: <cb0dba37-f3e4-acd7-444f-01a6dc737919@linux.ibm.com> (raw)
In-Reply-To: <20211018015418.10182-1-wanjiabing@vivo.com>
On 18/10/21 7:24 am, Wan Jiabing wrote:
> 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>
Thanks for fixing this!
Acked-by: Hari Bathini <hbathini@linux.ibm.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;
> }
> }
>
next prev parent reply other threads:[~2021-10-18 7:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 1:54 [PATCH] powerpc/kexec_file: Add of_node_put() before goto Wan Jiabing
2021-10-18 7:07 ` Hari Bathini [this message]
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=cb0dba37-f3e4-acd7-444f-01a6dc737919@linux.ibm.com \
--to=hbathini@linux.ibm.com \
--cc=bauerman@linux.ibm.com \
--cc=benh@kernel.crashing.org \
--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 \
--cc=wanjiabing@vivo.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).