Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73308b21 authored by Junjie Wu's avatar Junjie Wu
Browse files

cpufreq: persistent_stats: Use correct CPU to get freq table



If a policy manages multiple CPUs, frequency table might only be
available on policy->cpu. Use the correct CPU to obtain frequency
table.

Change-Id: I3a52bb88f64df70e32e511a37d8364a0f62b507c
Signed-off-by: default avatarJunjie Wu <junjiew@codeaurora.org>
parent d1e3eec8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -160,7 +160,7 @@ static int cpufreq_stats_create_table(unsigned int cpu,
	struct cpu_persistent_stats *cpu_stats = &per_cpu(pcpu_stats, cpu);
	unsigned long irq_flags;
	struct cpufreq_frequency_table *table =
		cpufreq_frequency_get_table(cpu);
		cpufreq_frequency_get_table(policy->cpu);

	if (unlikely(!table))
		return -EINVAL;