diff mbox

[1/1] cpufreq: ti-cpufreq: add missing of_node_put()

Message ID 1507642040-13646-1-git-send-email-zumeng.chen@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Zumeng Chen Oct. 10, 2017, 1:27 p.m. UTC
call of_node_put to release the refcount of np.

Signed-off-by: Zumeng Chen <zumeng.chen@gmail.com>
---
 drivers/cpufreq/ti-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Viresh Kumar Oct. 11, 2017, 4:10 a.m. UTC | #1
On 10-10-17, 21:27, Zumeng Chen wrote:
> call of_node_put to release the refcount of np.
> 
> Signed-off-by: Zumeng Chen <zumeng.chen@gmail.com>
> ---
>  drivers/cpufreq/ti-cpufreq.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c
> index ffcddcd..923317f 100644
> --- a/drivers/cpufreq/ti-cpufreq.c
> +++ b/drivers/cpufreq/ti-cpufreq.c
> @@ -205,6 +205,7 @@ static int ti_cpufreq_init(void)
>  
>  	np = of_find_node_by_path("/");
>  	match = of_match_node(ti_cpufreq_of_match, np);
> +	of_node_put(np);
>  	if (!match)
>  		return -ENODEV;
>  

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
diff mbox

Patch

diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c
index ffcddcd..923317f 100644
--- a/drivers/cpufreq/ti-cpufreq.c
+++ b/drivers/cpufreq/ti-cpufreq.c
@@ -205,6 +205,7 @@  static int ti_cpufreq_init(void)
 
 	np = of_find_node_by_path("/");
 	match = of_match_node(ti_cpufreq_of_match, np);
+	of_node_put(np);
 	if (!match)
 		return -ENODEV;