]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pci/hotplug/pciehp_hpc.c
PCI hotplug: pciehp: fix possible memory leak in pcie_init
[linux-2.6-omap-h63xx.git] / drivers / pci / hotplug / pciehp_hpc.c
index 4c74d536d45cfd0c0a3c19247159d6e88a16db91..4b921226f8881b375ce6c0dffa69bb97c4475c8b 100644 (file)
@@ -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;