Commit 9d2524b0 authored by Wen-chien Jesse Sung's avatar Wen-chien Jesse Sung Committed by Luis Henriques

UBUNTU: SAUCE: Bluetooth: decrease refcount after use

BugLink: https://launchpad.net/bugs/1641569

pci_get_subsys() will increase pci device refcount if it finds a
match. Explicitly decrease refcount if a device is found.
Signed-off-by: default avatarWen-chien Jesse Sung <jesse.sung@canonical.com>
Acked-by: default avatarTim Gardner <tim.gardner@canonical.com>
Acked-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 38a6598a
...@@ -2975,9 +2975,13 @@ static int btusb_probe(struct usb_interface *intf, ...@@ -2975,9 +2975,13 @@ static int btusb_probe(struct usb_interface *intf,
} }
if (id->driver_info & BTUSB_MARVELL) { if (id->driver_info & BTUSB_MARVELL) {
struct pci_dev *pdev;
hdev->set_bdaddr = btusb_set_bdaddr_marvell; hdev->set_bdaddr = btusb_set_bdaddr_marvell;
if (pci_get_subsys(PCI_ANY_ID, PCI_ANY_ID, 0x1028, 0x0720, NULL) || pdev = pci_get_subsys(PCI_ANY_ID, PCI_ANY_ID, 0x1028, 0x0720, NULL);
pci_get_subsys(PCI_ANY_ID, PCI_ANY_ID, 0x1028, 0x0733, NULL)) { if (!pdev)
pdev = pci_get_subsys(PCI_ANY_ID, PCI_ANY_ID, 0x1028, 0x0733, NULL);
if (pdev) {
pci_dev_put(pdev);
hdev->post_open = btusb_edge_post_open; hdev->post_open = btusb_edge_post_open;
hdev->shutdown = btusb_edge_shutdown; hdev->shutdown = btusb_edge_shutdown;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment