提交 b84346ef 编写于 作者: K Kenji Kaneshige 提交者: Jesse Barnes

PCI hotplug: pciehp: fix possible memory leak in pcie_init

Fix the error paths in pcie_init to avoid leaking memory.
Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
上级 a1c19894
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册