]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
PCI: cpqphp: Add missing call to pci_disable_device()
authorQuentin Lambert <lambert.quentin@gmail.com>
Sat, 19 Nov 2016 17:41:48 +0000 (18:41 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 23 Nov 2016 22:54:32 +0000 (16:54 -0600)
Most error branches following the call to pci_enable_device() contain a
call to pci_disable_device().  Add these calls where they are missing.

This issue was found with Hector.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/hotplug/cpqphp_core.c

index 74f3a0695b43e2ba94d8c8fe2824ec001681708f..ec009a7dba209868e88b9f002ff4c3b84d8f55f9 100644 (file)
@@ -867,7 +867,8 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
         */
        if ((pdev->revision <= 2) && (vendor_id != PCI_VENDOR_ID_INTEL)) {
                err(msg_HPC_not_supported);
-               return -ENODEV;
+               rc = -ENODEV;
+               goto err_disable_device;
        }
 
        /* TODO: This code can be made to support non-Compaq or Intel