From: Frank Lee <tiny.windzz@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: rjw@rjwysocki.net, Thierry Reding <thierry.reding@gmail.com>,
jonathanh@nvidia.com, Linux PM <linux-pm@vger.kernel.org>,
linux-tegra@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpufreq: tegra124: add missing of_node_put()
Date: Mon, 4 Feb 2019 15:26:36 +0800 [thread overview]
Message-ID: <CAEExFWtzRJX6-_A2mgKpRuvSws7SNZPMAbcuPu-maP3Jh=xnyg@mail.gmail.com> (raw)
In-Reply-To: <20190204071809.versc7prqit3vzgc@vireshk-i7>
On Mon, Feb 4, 2019 at 3:18 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 04-02-19, 15:00, Frank Lee wrote:
> > On Mon, Feb 4, 2019 at 2:36 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > >
> > > On 04-02-19, 01:35, Yangtao Li wrote:
> > > > of_cpu_device_node_get() will increase the refcount of device_node,
> > > > it is necessary to call of_node_put() at the end to release the
> > > > refcount.
> > > >
> > > > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > > > ---
> > > > drivers/cpufreq/tegra124-cpufreq.c | 2 ++
> > > > 1 file changed, 2 insertions(+)
> > > >
> > > > diff --git a/drivers/cpufreq/tegra124-cpufreq.c b/drivers/cpufreq/tegra124-cpufreq.c
> > > > index 43530254201a..140a9266b64a 100644
> > > > --- a/drivers/cpufreq/tegra124-cpufreq.c
> > > > +++ b/drivers/cpufreq/tegra124-cpufreq.c
> > > > @@ -118,6 +118,8 @@ static int tegra124_cpufreq_probe(struct platform_device *pdev)
> > > > goto out_put_pllx_clk;
> > > > }
> > > >
> > > > + of_node_put(np);
> > > > +
> > > > ret = tegra124_cpu_switch_to_dfll(priv);
> > > > if (ret)
> > > > goto out_put_pllp_clk;
> > >
> > > Fixes and stable tags ?
> > Hi viresh,
> >
> > Like this?
> >
> > Fixes: 9eb15dbbfa1a2 ("cpufreq: Add cpufreq driver for Tegra124")
> > Cc: stable@vger.kernel.org
>
> This needs to be something like:
>
> Cc: 4.5+ stable@vger.kernel.org #4.5+
>
> Also I don't think your patch is entirely correct as we will end up
> doing of_node_put() twice in error path.
Thanks for your reminder, I will modify it immediately.
MBR,
Yangtao
>
> --
> viresh
next prev parent reply other threads:[~2019-02-04 7:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-04 6:35 [PATCH] cpufreq: tegra124: add missing of_node_put() Yangtao Li
2019-02-04 6:36 ` Viresh Kumar
2019-02-04 7:00 ` Frank Lee
2019-02-04 7:18 ` Viresh Kumar
2019-02-04 7:26 ` Frank Lee [this message]
2019-02-04 7:28 ` Thierry Reding
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='CAEExFWtzRJX6-_A2mgKpRuvSws7SNZPMAbcuPu-maP3Jh=xnyg@mail.gmail.com' \
--to=tiny.windzz@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=thierry.reding@gmail.com \
--cc=viresh.kumar@linaro.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;
as well as URLs for NNTP newsgroup(s).