diff options
author | 2022-11-16 19:33:39 +0800 | |
---|---|---|
committer | 2022-11-30 19:50:04 +0100 | |
commit | 91fda1f88c0968f1491ab150bb01690525af150a (patch) | |
tree | 188a7f3389628a2ce0a9917f4adfd022e9954460 /drivers/cpufreq | |
parent | cpufreq: Init completion before kobject_init_and_add() (diff) | |
download | linux-91fda1f88c0968f1491ab150bb01690525af150a.tar.gz linux-91fda1f88c0968f1491ab150bb01690525af150a.tar.bz2 linux-91fda1f88c0968f1491ab150bb01690525af150a.zip |
cpufreq: amd_freq_sensitivity: Add missing pci_dev_put()
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: 59a3b3a8db16 ("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>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/amd_freq_sensitivity.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/cpufreq/amd_freq_sensitivity.c b/drivers/cpufreq/amd_freq_sensitivity.c index 6448e03bcf48..59b19b9975e8 100644 --- a/drivers/cpufreq/amd_freq_sensitivity.c +++ b/drivers/cpufreq/amd_freq_sensitivity.c @@ -125,6 +125,8 @@ static int __init amd_freq_sensitivity_init(void) if (!pcidev) { if (!boot_cpu_has(X86_FEATURE_PROC_FEEDBACK)) return -ENODEV; + } else { + pci_dev_put(pcidev); } if (rdmsrl_safe(MSR_AMD64_FREQ_SENSITIVITY_ACTUAL, &val)) |