[PATCH 1/2] pciehp: fix possible memory leak in pcie_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix possible memory leak problem in pcie_init().

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@xxxxxxxxxxxxxx>

---
 drivers/pci/hotplug/pciehp_hpc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: 20081022/drivers/pci/hotplug/pciehp_hpc.c
===================================================================
--- 20081022.orig/drivers/pci/hotplug/pciehp_hpc.c
+++ 20081022/drivers/pci/hotplug/pciehp_hpc.c
@@ -1147,11 +1147,11 @@ struct controller *pcie_init(struct pcie
 	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;


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux