mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Signed-off-by: Jesse Barnes <[email protected]>
This commit is contained in:
parent
a1c19894b7
commit
b84346ef74
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue