drivers/cpufreq/scmi-cpufreq.c | 1 + 1 file changed, 1 insertion(+)
When calling of_parse_phandle_with_args(), the caller is responsible
to call of_node_put() to release the reference of device node.
In scmi_cpu_domain_id(), it does not release the reference.
Fixes: e336baa4193e ("cpufreq: scmi: Prepare to move OF parsing of domain-id to cpufreq")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
drivers/cpufreq/scmi-cpufreq.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index e0e1756180b0..c7a3b038385b 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -101,6 +101,7 @@ static int scmi_cpu_domain_id(struct device *cpu_dev)
return -EINVAL;
}
+ of_node_put(domain_id.np);
return domain_id.args[0];
}
---
base-commit: 053966c344dbd346e71305f530e91ea77916189f
change-id: 20260121-b4-scmi-cpufreq-243a7676eb4c
Best regards,
--
Felix Gu <ustc.gu@gmail.com>
On 21-01-26, 23:32, Felix Gu wrote:
> When calling of_parse_phandle_with_args(), the caller is responsible
> to call of_node_put() to release the reference of device node.
> In scmi_cpu_domain_id(), it does not release the reference.
>
> Fixes: e336baa4193e ("cpufreq: scmi: Prepare to move OF parsing of domain-id to cpufreq")
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---
> drivers/cpufreq/scmi-cpufreq.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
> index e0e1756180b0..c7a3b038385b 100644
> --- a/drivers/cpufreq/scmi-cpufreq.c
> +++ b/drivers/cpufreq/scmi-cpufreq.c
> @@ -101,6 +101,7 @@ static int scmi_cpu_domain_id(struct device *cpu_dev)
> return -EINVAL;
> }
>
> + of_node_put(domain_id.np);
> return domain_id.args[0];
> }
Applied. Thanks.
--
viresh
© 2016 - 2026 Red Hat, Inc.