PM: EM: Decrement policy counter
authorPierre Gondois <Pierre.Gondois@arm.com>
Tue, 26 Apr 2022 14:44:48 +0000 (16:44 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 11 May 2022 17:15:14 +0000 (19:15 +0200)
commitc9d8923bfbcb63f15ea6cb2b5c8426fc3d96f643
tree09e7d95f0fc446624eca78b0bf76c991cf3e9037
parent985a67709a66c456414182ed179544786e00321e
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.

Fixes: e458716a92b57 ("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>
kernel/power/energy_model.c