Commit 26acfe74 authored by Jon Hunter's avatar Jon Hunter Committed by Marc Zyngier

irqchip/gic: Don't initialise chip if mapping IO space fails

If we fail to map the address space for the GIC distributor or CPU
interface, then don't attempt to initialise the chip, just WARN and
return.
Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent 992345a5
...@@ -1209,10 +1209,14 @@ gic_of_init(struct device_node *node, struct device_node *parent) ...@@ -1209,10 +1209,14 @@ gic_of_init(struct device_node *node, struct device_node *parent)
return -ENODEV; return -ENODEV;
dist_base = of_iomap(node, 0); dist_base = of_iomap(node, 0);
WARN(!dist_base, "unable to map gic dist registers\n"); if (WARN(!dist_base, "unable to map gic dist registers\n"))
return -ENOMEM;
cpu_base = of_iomap(node, 1); cpu_base = of_iomap(node, 1);
WARN(!cpu_base, "unable to map gic cpu registers\n"); if (WARN(!cpu_base, "unable to map gic cpu registers\n")) {
iounmap(dist_base);
return -ENOMEM;
}
/* /*
* Disable split EOI/Deactivate if either HYP is not available * Disable split EOI/Deactivate if either HYP is not available
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment