From: Quentin Lambert Date: Sat, 19 Nov 2016 17:41:48 +0000 (+0100) Subject: PCI: cpqphp: Add missing call to pci_disable_device() X-Git-Tag: v4.14-rc1~1865^2~17^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b11d207fb229943d75c17cef4ae3fa980f0cee79;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Bjorn Helgaas --- diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c index 74f3a06..ec009a7 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