mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers: cpufreq: Add missing of_node_put() in qoriq-cpufreq.c
@ 2022-06-15  9:48 heliang
  2022-06-15  9:52 ` Viresh Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: heliang @ 2022-06-15  9:48 UTC (permalink / raw)
  To: rafael, viresh.kumar; +Cc: linux-pm, linux-kernel, windhl

In qoriq_cpufreq_probe(), of_find_matching_node() will return a
node pointer with refcount incremented. We should use of_node_put()
when it is not used anymore.

Signed-off-by: heliang <windhl@126.com>
---
 drivers/cpufreq/qoriq-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c
index 6b6b20da2bcf..573b417e1483 100644
--- a/drivers/cpufreq/qoriq-cpufreq.c
+++ b/drivers/cpufreq/qoriq-cpufreq.c
@@ -275,6 +275,7 @@ static int qoriq_cpufreq_probe(struct platform_device *pdev)
 
 	np = of_find_matching_node(NULL, qoriq_cpufreq_blacklist);
 	if (np) {
+		of_node_put(np);
 		dev_info(&pdev->dev, "Disabling due to erratum A-008083");
 		return -ENODEV;
 	}
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] drivers: cpufreq: Add missing of_node_put() in qoriq-cpufreq.c
  2022-06-15  9:48 [PATCH] drivers: cpufreq: Add missing of_node_put() in qoriq-cpufreq.c heliang
@ 2022-06-15  9:52 ` Viresh Kumar
  0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2022-06-15  9:52 UTC (permalink / raw)
  To: heliang; +Cc: rafael, linux-pm, linux-kernel

On 15-06-22, 17:48, heliang wrote:
> In qoriq_cpufreq_probe(), of_find_matching_node() will return a
> node pointer with refcount incremented. We should use of_node_put()
> when it is not used anymore.
> 
> Signed-off-by: heliang <windhl@126.com>
> ---
>  drivers/cpufreq/qoriq-cpufreq.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c
> index 6b6b20da2bcf..573b417e1483 100644
> --- a/drivers/cpufreq/qoriq-cpufreq.c
> +++ b/drivers/cpufreq/qoriq-cpufreq.c
> @@ -275,6 +275,7 @@ static int qoriq_cpufreq_probe(struct platform_device *pdev)
>  
>  	np = of_find_matching_node(NULL, qoriq_cpufreq_blacklist);
>  	if (np) {
> +		of_node_put(np);
>  		dev_info(&pdev->dev, "Disabling due to erratum A-008083");
>  		return -ENODEV;
>  	}

Applied with fixes tag. Thanks.

-- 
viresh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-15 10:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15  9:48 [PATCH] drivers: cpufreq: Add missing of_node_put() in qoriq-cpufreq.c heliang
2022-06-15  9:52 ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®