]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
PCI: release temporary reference in __nv_msi_ht_cap_quirk()
authorMyron Stowe <myron.stowe@redhat.com>
Mon, 9 Jul 2012 21:36:08 +0000 (15:36 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 9 Jul 2012 22:43:27 +0000 (16:43 -0600)
__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>
drivers/pci/quirks.c

index 51c4a4409e8c8e501a3d138ab24448dd336a5c97..50448c291a8fc5d8b1a23b174a611ea3dd4e8dce 100644 (file)
@@ -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)