summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2008-10-22 14:30:15 +0900
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-10-22 16:42:45 -0700
commitb84346ef74cf76793070762b933387729c5df1ed (patch)
tree2aa7716ad7b047dce83ebacd20ee0886b350cd62 /drivers/pci
parenta1c19894b786f10c76ac40e93c6b5d70c9b946d2 (diff)
PCI hotplug: pciehp: fix possible memory leak in pcie_init
Fix the error paths in pcie_init to avoid leaking memory. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/hotplug/pciehp_hpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 4c74d536d45..4b921226f88 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -1147,11 +1147,11 @@ struct controller *pcie_init(struct pcie_device *dev)
if (!ctrl->cap_base) {
ctrl_err(ctrl, "%s: Cannot find PCI Express capability\n",
__func__);
- goto abort;
+ goto abort_ctrl;
}
if (pciehp_readl(ctrl, SLOTCAP, &slot_cap)) {
ctrl_err(ctrl, "%s: Cannot read SLOTCAP register\n", __func__);
- goto abort;
+ goto abort_ctrl;
}
ctrl->slot_cap = slot_cap;