Skip to content

Commit d0cdd85

Browse files
fenghusthujwrdegoede
authored andcommitted
platform/x86: asus-wmi: add missing pci_dev_put() in asus_wmi_set_xusb2pr()
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
1 parent 2dbfb3f commit d0cdd85

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/platform/x86/asus-wmi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,6 +1738,8 @@ static void asus_wmi_set_xusb2pr(struct asus_wmi *asus)
17381738
pci_write_config_dword(xhci_pdev, USB_INTEL_XUSB2PR,
17391739
cpu_to_le32(ports_available));
17401740

1741+
pci_dev_put(xhci_pdev);
1742+
17411743
pr_info("set USB_INTEL_XUSB2PR old: 0x%04x, new: 0x%04x\n",
17421744
orig_ports_available, ports_available);
17431745
}

0 commit comments

Comments
 (0)