[2/6] irqchip/armada-370-xp: Fix return check in IPI alloc

Message ID 20210102175859.335447-2-adam@l4re.org
State New
Headers show
Series
  • Untitled series #90507
Related show

Commit Message

Adam Lackorzynski Jan. 2, 2021, 5:58 p.m.
__irq_domain_alloc_irqs returns a negative error
code upon failure, not only 0. Also use irq_domain_alloc_irqs
to require less default arguments.

Signed-off-by: Adam Lackorzynski <adam@l4re.org>
---
 drivers/irqchip/irq-armada-370-xp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
index 32938dfc0e46..b5e3aacdc2d1 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -430,9 +430,9 @@  static __init void armada_xp_ipi_init(struct device_node *node)
 		return;
 
 	irq_domain_update_bus_token(ipi_domain, DOMAIN_BUS_IPI);
-	base_ipi = __irq_domain_alloc_irqs(ipi_domain, -1, IPI_DOORBELL_END,
-					   NUMA_NO_NODE, NULL, false, NULL);
-	if (WARN_ON(!base_ipi))
+	base_ipi = irq_domain_alloc_irqs(ipi_domain, IPI_DOORBELL_END,
+					 NUMA_NO_NODE, NULL);
+	if (WARN_ON(base_ipi <= 0))
 		return;
 
 	set_smp_ipi_range(base_ipi, IPI_DOORBELL_END);