Patch "cpufreq: amd_freq_sensitivity: Add missing pci_dev_put()" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    cpufreq: amd_freq_sensitivity: Add missing pci_dev_put()

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     cpufreq-amd_freq_sensitivity-add-missing-pci_dev_put.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a00a4db924dda8debcd26afb0bc989b73992b05d
Author: Xiongfeng Wang <wangxiongfeng2@xxxxxxxxxx>
Date:   Wed Nov 16 19:33:39 2022 +0800

    cpufreq: amd_freq_sensitivity: Add missing pci_dev_put()
    
    [ Upstream commit 91fda1f88c0968f1491ab150bb01690525af150a ]
    
    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@xxxxxxxxxx>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/cpufreq/amd_freq_sensitivity.c b/drivers/cpufreq/amd_freq_sensitivity.c
index d0b10baf039a..151771129c7b 100644
--- a/drivers/cpufreq/amd_freq_sensitivity.c
+++ b/drivers/cpufreq/amd_freq_sensitivity.c
@@ -124,6 +124,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))



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux