Skip to content

Commit c9d8923

Browse files
pierregondoisrafaeljw
authored andcommitted
PM: EM: Decrement policy counter
In commit e458716 ("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. Fixes: e458716 ("PM: EM: Mark inefficiencies in CPUFreq") Tested-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Vincent Donnefort <vincent.donnefort@arm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 985a677 commit c9d8923

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

kernel/power/energy_model.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ static void em_cpufreq_update_efficiencies(struct device *dev)
259259
found++;
260260
}
261261

262+
cpufreq_cpu_put(policy);
263+
262264
if (!found)
263265
return;
264266

0 commit comments

Comments
 (0)