Unverified Commit 251d2dd6 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12361 cpufreq: Avoid a bad reference count on CPU node

parents 86591467 e530d0ca
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -1135,10 +1135,9 @@ static inline int parse_perf_domain(int cpu, const char *list_name,
				    const char *cell_name,
				    struct of_phandle_args *args)
{
	struct device_node *cpu_np;
	int ret;

	cpu_np = of_cpu_device_node_get(cpu);
	struct device_node *cpu_np __free(device_node) = of_cpu_device_node_get(cpu);
	if (!cpu_np)
		return -ENODEV;

@@ -1146,9 +1145,6 @@ static inline int parse_perf_domain(int cpu, const char *list_name,
					 args);
	if (ret < 0)
		return ret;

	of_node_put(cpu_np);

	return 0;
}