summaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-ls1x.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-03-29 09:21:37 +0300
committerThomas Gleixner <tglx@linutronix.de>2019-04-05 15:37:56 +0300
commit95c5c618fa4349b2ba13aebeabf71911208dfc5e (patch)
treed1e981c0a8a22599bf75ac6c1815ab18b4337563 /drivers/irqchip/irq-ls1x.c
parent79a3aaa7b82e3106be97842dedfd8429248896e6 (diff)
downloadlinux-95c5c618fa4349b2ba13aebeabf71911208dfc5e.tar.xz
irqchip/irq-ls1x: Missing error code in ls1x_intc_of_init()
Currently, when irq_domain_add_linear() fails, the error code does not get set so it returns zero which is wrong. Fix it by setting the appropriate error code. Fixes: 9e543e22e204 ("irqchip: Add driver for Loongson-1 interrupt controller") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Jiaxun Yang <jiaxun.yang@flygoat.com> Cc: Jason Cooper <jason@lakedaemon.net> Cc: kernel-janitors@vger.kernel.org Link: https://lkml.kernel.org/r/20190329062136.GQ32613@kadam
Diffstat (limited to 'drivers/irqchip/irq-ls1x.c')
-rw-r--r--drivers/irqchip/irq-ls1x.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-ls1x.c b/drivers/irqchip/irq-ls1x.c
index 86b72fbd3b45..353111a10413 100644
--- a/drivers/irqchip/irq-ls1x.c
+++ b/drivers/irqchip/irq-ls1x.c
@@ -130,6 +130,7 @@ static int __init ls1x_intc_of_init(struct device_node *node,
NULL);
if (!priv->domain) {
pr_err("ls1x-irq: cannot add IRQ domain\n");
+ err = -ENOMEM;
goto out_iounmap;
}