Commit 093d24a204 ("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: 093d24a204 ("arm64: PCI: Manage controller-specific data on per-controller basis")
Reviewed-by: Tomasz Nowicki <[email protected]>
Signed-off-by: Timmy Li <[email protected]>
[[email protected]: refactored code, rewrote commit log]
Signed-off-by: Lorenzo Pieralisi <[email protected]>
CC: Will Deacon <[email protected]>
CC: Bjorn Helgaas <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>