mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
cpufreq: amd_freq_sensitivity: Add missing pci_dev_put()
[ Upstream commit91fda1f88c
] pci_get_device() will increase the reference count for the returned pci_dev. We need to use pci_dev_put() to decrease the reference count after using pci_get_device(). Let's add it. Fixes:59a3b3a8db
("cpufreq: AMD: Ignore the check for ProcFeedback in ST/CZ") Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
5f6d5b0222
commit
8dc428b308
@ -122,6 +122,8 @@ static int __init amd_freq_sensitivity_init(void)
|
||||
if (!pcidev) {
|
||||
if (!static_cpu_has(X86_FEATURE_PROC_FEEDBACK))
|
||||
return -ENODEV;
|
||||
} else {
|
||||
pci_dev_put(pcidev);
|
||||
}
|
||||
|
||||
if (rdmsrl_safe(MSR_AMD64_FREQ_SENSITIVITY_ACTUAL, &val))
|
||||
|
Loading…
Reference in New Issue
Block a user