Skip to content

Commit 0b7fbf9

Browse files
outman119vireshk
authored andcommitted
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: e336baa ("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>
1 parent dea8bfe commit 0b7fbf9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/cpufreq/scmi-cpufreq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ static int scmi_cpu_domain_id(struct device *cpu_dev)
101101
return -EINVAL;
102102
}
103103

104+
of_node_put(domain_id.np);
104105
return domain_id.args[0];
105106
}
106107

0 commit comments

Comments
 (0)