[tip: irq/core] irqchip/xilinx: Fill error code when irq domain registration fails

tip-bot2 for Michal Simek
2020-03-29T20:26:26Z

The following commit has been merged into the irq/core branch of tip:

Commit-ID: c74038baa9bccac76344b7215a55be136c81dfc3
Gitweb: https://git.kernel.org/tip/c74038baa9bccac76344b7215a55be136c81dfc3
Author: Michal Simek <michal.simek@xilinx.com>
AuthorDate: Tue, 17 Mar 2020 18:25:58 +05:30
Committer: Marc Zyngier <maz@kernel.org>
CommitterDate: Sun, 22 Mar 2020 11:52:53

irqchip/xilinx: Fill error code when irq domain registration fails

There is no ret filled in case of irq_domain_add_linear() failure.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Stefan Asserhall <stefan.asserhall@xilinx.com>
Link: https://lore.kernel.org/r/20200317125600.15913-3-mubin.usman.sayyed@xilinx.com
---
drivers/irqchip/irq-xilinx-intc.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/irqchip/irq-xilinx-intc.c b/drivers/irqchip/irq-xilinx-intc.c
index 34593fa..1d3d273 100644
--- a/drivers/irqchip/irq-xilinx-intc.c
+++ b/drivers/irqchip/irq-xilinx-intc.c
@@ -228,6 +228,7 @@ static int __init xilinx_intc_of_init(struct device_node *intc,
&xintc_irq_domain_ops, irqc);
if (!irqc->root_domain) {
pr_err("irq-xilinx: Unable to create IRQ domain\n");
+ ret = -EINVAL;
goto error;
}