summaryrefslogtreecommitdiff
path: root/drivers/pci/quirks.c
diff options
context:
space:
mode:
authorMyron Stowe <myron.stowe@redhat.com>2012-07-10 01:36:08 +0400
committerBjorn Helgaas <bhelgaas@google.com>2012-07-10 02:43:27 +0400
commitdff3aef7139ce1be190be6d13505a35d5c7c0c3c (patch)
tree4adcfd11b83f1ceff89b8eebd69b67b99e9550d8 /drivers/pci/quirks.c
parent2729d5b18df363167d0c0be428876f3c07d2617b (diff)
downloadlinux-dff3aef7139ce1be190be6d13505a35d5c7c0c3c.tar.xz
PCI: release temporary reference in __nv_msi_ht_cap_quirk()
__nv_msi_ht_cap_quirk() acquires a temporary reference via 'pci_get_bus_and_slot()' that is never released. This patch releases the temporary reference. Signed-off-by: Myron Stowe <myron.stowe@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r--drivers/pci/quirks.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 51c4a4409e8c..50448c291a8f 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2541,15 +2541,18 @@ static void __devinit __nv_msi_ht_cap_quirk(struct pci_dev *dev, int all)
else
nv_ht_enable_msi_mapping(dev);
}
- return;
+ goto out;
}
/* HT MSI is not enabled */
if (found == 1)
- return;
+ goto out;
/* Host bridge is not to HT, disable HT MSI mapping on this device */
ht_disable_msi_mapping(dev);
+
+out:
+ pci_dev_put(host_bridge);
}
static void __devinit nv_msi_ht_cap_quirk_all(struct pci_dev *dev)