aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/kernel/pci.c')
-rw-r--r--arch/arm64/kernel/pci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
index 409abc45bdb6..1b3eb67edefb 100644
--- a/arch/arm64/kernel/pci.c
+++ b/arch/arm64/kernel/pci.c
@@ -175,8 +175,10 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
return NULL;
root_ops = kzalloc_node(sizeof(*root_ops), GFP_KERNEL, node);
- if (!root_ops)
+ if (!root_ops) {
+ kfree(ri);
return NULL;
+ }
ri->cfg = pci_acpi_setup_ecam_mapping(root);
if (!ri->cfg) {