History

PM: EM: Decrement policy counter

In commit e458716a92b57 ("PM: EM: Mark inefficiencies in CPUFreq"), cpufreq_cpu_get() is called without a cpufreq_cpu_put(), permanently increasing the reference counts of the policy struct. Decrement the reference count once the policy struct is not used anymore.

Pierre Gondois committed 4 years ago

Commit c9d89231 parent 985a6771 file · +2 −0Browse files

Unified · Split

kernel/power/energy_model.c+2−0
@@ -259,6 +259,8 @@ static void em_cpufreq_update_efficiencies(struct device *dev) · 258 unmodified lines
259259 found++;
260260 }
261261
262+ cpufreq_cpu_put(policy);
263+
262264 if (!found)
263265 return;
264266