Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 717902cc authored by Timmy Li's avatar Timmy Li Committed by Catalin Marinas
Browse files

ARM64: PCI: Fix struct acpi_pci_root_ops allocation failure path



Commit 093d24a2 ("arm64: PCI: Manage controller-specific data on
per-controller basis") added code to allocate ACPI PCI root_ops
dynamically on a per host bridge basis but failed to update the
corresponding memory allocation failure path in pci_acpi_scan_root()
leading to a potential memory leakage.

Fix it by adding the required kfree call.

Fixes: 093d24a2 ("arm64: PCI: Manage controller-specific data on per-controller basis")
Reviewed-by: default avatarTomasz Nowicki <tn@semihalf.com>
Signed-off-by: default avatarTimmy Li <lixiaoping3@huawei.com>
[lorenzo.pieralisi@arm.com: refactored code, rewrote commit log]
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
CC: Will Deacon <will.deacon@arm.com>
CC: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 63a1e1c9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment