From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com ([74.125.82.66]:34468 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752234AbcKSRpL (ORCPT ); Sat, 19 Nov 2016 12:45:11 -0500 From: Quentin Lambert To: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Cc: Quentin Lambert Subject: [PATCH] PCI Hotplug: cpqphp: Add missing call to pci_disable_device Date: Sat, 19 Nov 2016 18:41:48 +0100 Message-Id: <20161119174148.20187-1-lambert.quentin@gmail.com> Sender: linux-pci-owner@vger.kernel.org List-ID: Most error branches following the call to pci_enable_device contain a call to pci_disable_device. This patch add these calls where they are missing. This issue was found with Hector. Signed-off-by: Quentin Lambert --- drivers/pci/hotplug/cpqphp_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- 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 * */ 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