[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <157425606271.12247.62239776985279233.tip-bot2@tip-bot2>
Date: Wed, 20 Nov 2019 13:21:02 -0000
From: "tip-bot2 for Paul Cercueil" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Paul Cercueil <paul@...pouillou.net>,
Marc Zyngier <maz@...nel.org>, Ingo Molnar <mingo@...nel.org>,
Borislav Petkov <bp@...en8.de>, linux-kernel@...r.kernel.org
Subject: [tip: irq/core] irqchip: ingenic: Error out if IRQ domain creation failed
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 52ecc87642f273a599c9913b29fd179c13de457b
Gitweb: https://git.kernel.org/tip/52ecc87642f273a599c9913b29fd179c13de457b
Author: Paul Cercueil <paul@...pouillou.net>
AuthorDate: Wed, 02 Oct 2019 19:25:22 +08:00
Committer: Marc Zyngier <maz@...nel.org>
CommitterDate: Sun, 10 Nov 2019 18:55:30
irqchip: ingenic: Error out if IRQ domain creation failed
If we cannot create the IRQ domain, the driver should fail to probe
instead of succeeding with just a warning message.
Signed-off-by: Paul Cercueil <paul@...pouillou.net>
Signed-off-by: Marc Zyngier <maz@...nel.org>
Link: https://lore.kernel.org/r/1570015525-27018-3-git-send-email-zhouyanjie@zoho.com
---
drivers/irqchip/irq-ingenic.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/irqchip/irq-ingenic.c b/drivers/irqchip/irq-ingenic.c
index 06fa810..d97a3a5 100644
--- a/drivers/irqchip/irq-ingenic.c
+++ b/drivers/irqchip/irq-ingenic.c
@@ -87,6 +87,14 @@ static int __init ingenic_intc_of_init(struct device_node *node,
goto out_unmap_irq;
}
+ domain = irq_domain_add_legacy(node, num_chips * 32,
+ JZ4740_IRQ_BASE, 0,
+ &irq_domain_simple_ops, NULL);
+ if (!domain) {
+ err = -ENOMEM;
+ goto out_unmap_base;
+ }
+
for (i = 0; i < num_chips; i++) {
/* Mask all irqs */
writel(0xffffffff, intc->base + (i * CHIP_SIZE) +
@@ -112,14 +120,11 @@ static int __init ingenic_intc_of_init(struct device_node *node,
IRQ_NOPROBE | IRQ_LEVEL);
}
- domain = irq_domain_add_legacy(node, num_chips * 32, JZ4740_IRQ_BASE, 0,
- &irq_domain_simple_ops, NULL);
- if (!domain)
- pr_warn("unable to register IRQ domain\n");
-
setup_irq(parent_irq, &intc_cascade_action);
return 0;
+out_unmap_base:
+ iounmap(intc->base);
out_unmap_irq:
irq_dispose_mapping(parent_irq);
out_free:
Powered by blists - more mailing lists