diff options
| author | Felix Gu <ustc.gu@gmail.com> | 2026-01-21 23:32:06 +0800 |
|---|---|---|
| committer | Viresh Kumar <viresh.kumar@linaro.org> | 2026-01-27 11:21:24 +0530 |
| commit | 0b7fbf9333fa4699a53145bad8ce74ea986caa13 (patch) | |
| tree | 24cf04b88ed4819b0ca6036780413eb2e9ee88c8 /drivers | |
| parent | dea8bfea76e4bea9f727f777604d4053d7e9cd92 (diff) | |
cpufreq: scmi: Fix device_node reference leak in scmi_cpu_domain_id()
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>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/cpufreq/scmi-cpufreq.c | 1 |
1 files changed, 1 insertions, 0 deletions
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]; } |
