Commit 0b7fbf93 authored by Felix Gu's avatar Felix Gu Committed by Viresh Kumar
Browse files

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: e336baa4 ("cpufreq: scmi: Prepare to move OF parsing of domain-id to cpufreq")
Signed-off-by: default avatarFelix Gu <ustc.gu@gmail.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent dea8bfea
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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];
}