From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Yuanjun Gong <ruc_gongyuanjun@163.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] mips: cpc: Fix refcount leak in mips_cpc_default_phys_base
Date: Tue, 26 Apr 2022 16:32:45 +0200 [thread overview]
Message-ID: <20220426143245.GF18291@alpha.franken.de> (raw)
In-Reply-To: <20220407042657.28614-1-ruc_gongyuanjun@163.com>
On Thu, Apr 07, 2022 at 12:26:57PM +0800, Yuanjun Gong wrote:
> From: Gong Yuanjun <ruc_gongyuanjun@163.com>
>
> Add the missing of_node_put() to release the refcount incremented
> by of_find_compatible_node().
>
> Signed-off-by: Gong Yuanjun <ruc_gongyuanjun@163.com>
> ---
> arch/mips/kernel/mips-cpc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/mips/kernel/mips-cpc.c b/arch/mips/kernel/mips-cpc.c
> index 17aff13cd7ce..3e386f7e1545 100644
> --- a/arch/mips/kernel/mips-cpc.c
> +++ b/arch/mips/kernel/mips-cpc.c
> @@ -28,6 +28,7 @@ phys_addr_t __weak mips_cpc_default_phys_base(void)
> cpc_node = of_find_compatible_node(of_root, NULL, "mti,mips-cpc");
> if (cpc_node) {
> err = of_address_to_resource(cpc_node, 0, &res);
> + of_node_put(cpc_node);
> if (!err)
> return res.start;
> }
> --
> 2.17.1
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
prev parent reply other threads:[~2022-04-26 14:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 4:26 [PATCH 1/1] mips: cpc: Fix refcount leak in mips_cpc_default_phys_base Yuanjun Gong
2022-04-12 13:05 ` Serge Semin
2022-04-26 14:32 ` Thomas Bogendoerfer [this message]
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=20220426143245.GF18291@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=ruc_gongyuanjun@163.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).