diff mbox series

[v2] cpufreq: tegra124: add missing of_node_put()

Message ID 20190204074854.1538-1-tiny.windzz@gmail.com (mailing list archive)
State Superseded
Delegated to: viresh kumar
Headers show
Series [v2] cpufreq: tegra124: add missing of_node_put() | expand

Commit Message

Yangtao Li Feb. 4, 2019, 7:48 a.m. UTC
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.

Fixes: 9eb15dbbfa1a2 ("cpufreq: Add cpufreq driver for Tegra124")
Cc: <stable@vger.kernel.org> # 4.4+
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
v2:
- move of_node_put() to the very end
---
 drivers/cpufreq/tegra124-cpufreq.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Thierry Reding Feb. 4, 2019, 8:18 a.m. UTC | #1
On Mon, Feb 04, 2019 at 02:48:54AM -0500, 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.
> 
> Fixes: 9eb15dbbfa1a2 ("cpufreq: Add cpufreq driver for Tegra124")
> Cc: <stable@vger.kernel.org> # 4.4+
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
> v2:
> - move of_node_put() to the very end
> ---
>  drivers/cpufreq/tegra124-cpufreq.c | 2 ++
>  1 file changed, 2 insertions(+)

Acked-by: Thierry Reding <treding@nvidia.com>
Viresh Kumar Feb. 4, 2019, 8:56 a.m. UTC | #2
On 04-02-19, 09:18, Thierry Reding wrote:
> On Mon, Feb 04, 2019 at 02:48:54AM -0500, 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.
> > 
> > Fixes: 9eb15dbbfa1a2 ("cpufreq: Add cpufreq driver for Tegra124")
> > Cc: <stable@vger.kernel.org> # 4.4+
> > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > ---
> > v2:
> > - move of_node_put() to the very end
> > ---
> >  drivers/cpufreq/tegra124-cpufreq.c | 2 ++
> >  1 file changed, 2 insertions(+)
> 
> Acked-by: Thierry Reding <treding@nvidia.com>


Applied. Thanks.
diff mbox series

Patch

diff --git a/drivers/cpufreq/tegra124-cpufreq.c b/drivers/cpufreq/tegra124-cpufreq.c
index 43530254201a..4bb154f6c54c 100644
--- a/drivers/cpufreq/tegra124-cpufreq.c
+++ b/drivers/cpufreq/tegra124-cpufreq.c
@@ -134,6 +134,8 @@  static int tegra124_cpufreq_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, priv);
 
+	of_node_put(np);
+
 	return 0;
 
 out_switch_to_pllx: