diff options
author | Suzuki K Poulose <suzuki.poulose@arm.com> | 2017-07-04 10:56:33 +0100 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2017-07-04 11:11:25 +0100 |
commit | 63c16c6eacb69d0cbdaee5dea0dd56d238375fe6 (patch) | |
tree | cb8c873847b6e6bca9dc1a79f12523d26dcb159d /drivers | |
parent | 456c59c31c5126fe31c64956c43670060ea9debd (diff) | |
download | linux-stable-63c16c6eacb69d0cbdaee5dea0dd56d238375fe6.tar.gz linux-stable-63c16c6eacb69d0cbdaee5dea0dd56d238375fe6.tar.bz2 linux-stable-63c16c6eacb69d0cbdaee5dea0dd56d238375fe6.zip |
irqchip/gic-v3: Report failures in gic_irq_domain_alloc
If the GIC cannot map an IRQ via irq_domain_ops->alloc(), it doesn't
return an error code. This can cause a problem with drivers, where
it thinks it has successfully got an IRQ for the device, but requesting
the same ends up failure with -ENOSYS (as the IRQ's chip is not set).
Fixes: commit 443acc4f37f6 ("irqchip: GICv3: Convert to domain hierarchy")
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/irqchip/irq-gic-v3.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index dbffb7ab6203..47630e9998b3 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -831,8 +831,11 @@ static int gic_irq_domain_alloc(struct irq_domain *domain, unsigned int virq, if (ret) return ret; - for (i = 0; i < nr_irqs; i++) - gic_irq_domain_map(domain, virq + i, hwirq + i); + for (i = 0; i < nr_irqs; i++) { + ret = gic_irq_domain_map(domain, virq + i, hwirq + i); + if (ret) + return ret; + } return 0; } |