drivers/cpufreq/qoriq-cpufreq.c | 1 + 1 file changed, 1 insertion(+)
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
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
© 2016 - 2026 Red Hat, Inc.