diff options
author | Quentin Lambert <lambert.quentin@gmail.com> | 2016-11-19 18:41:48 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-11-23 16:54:32 -0600 |
commit | b11d207fb229943d75c17cef4ae3fa980f0cee79 (patch) | |
tree | 5f4a9714c94e60804d1122a92be1373d83391666 | |
parent | 1001354ca34179f3db924eb66672442a173147dc (diff) | |
download | linux-stable-b11d207fb229943d75c17cef4ae3fa980f0cee79.tar.gz linux-stable-b11d207fb229943d75c17cef4ae3fa980f0cee79.tar.bz2 linux-stable-b11d207fb229943d75c17cef4ae3fa980f0cee79.zip |
PCI: cpqphp: Add missing call to pci_disable_device()
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>
-rw-r--r-- | drivers/pci/hotplug/cpqphp_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c index 74f3a0695b43..ec009a7dba20 100644 --- a/drivers/pci/hotplug/cpqphp_core.c +++ b/drivers/pci/hotplug/cpqphp_core.c @@ -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 |