Skip to content

Commit b11d207

Browse files
Quentin Lambertbjorn-helgaas
authored andcommitted
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>
1 parent 1001354 commit b11d207

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/pci/hotplug/cpqphp_core.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,8 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
867867
*/
868868
if ((pdev->revision <= 2) && (vendor_id != PCI_VENDOR_ID_INTEL)) {
869869
err(msg_HPC_not_supported);
870-
return -ENODEV;
870+
rc = -ENODEV;
871+
goto err_disable_device;
871872
}
872873

873874
/* TODO: This code can be made to support non-Compaq or Intel

0 commit comments

Comments
 (0)