Re: [PATCH] platform/x86: asus-wmi: add missing pci_dev_put() in asus_wmi_set_xusb2pr()

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

 



Hi,

On 11/11/22 11:07, Xiongfeng Wang wrote:
> 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
> before asus_wmi_set_xusb2pr() returns.
> 
> Signed-off-by: Xiongfeng Wang <wangxiongfeng2@xxxxxxxxxx>

Thank you for your patch, I've applied this patch to my fixes
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=fixes

Note it will show up in my fixes branch once I've pushed my
local branch there, which might take a while.

I will include this patch in my next fixes pull-req to Linus
for the current kernel development cycle.

Regards,

Hans



> ---
>  drivers/platform/x86/asus-wmi.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> index 6e8e093f96b3..872efc1d5b36 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -1738,6 +1738,8 @@ static void asus_wmi_set_xusb2pr(struct asus_wmi *asus)
>  	pci_write_config_dword(xhci_pdev, USB_INTEL_XUSB2PR,
>  				cpu_to_le32(ports_available));
>  
> +	pci_dev_put(xhci_pdev);
> +
>  	pr_info("set USB_INTEL_XUSB2PR old: 0x%04x, new: 0x%04x\n",
>  			orig_ports_available, ports_available);
>  }




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux