* [PATCH] irqchip/irq-ls1x: Missing error code in ls1x_intc_of_init()
@ 2019-03-28 14:38 Dan Carpenter
2019-03-28 19:14 ` Mukesh Ojha
0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2019-03-28 14:38 UTC (permalink / raw)
To: Marc Zyngier, Jiaxun Yang
Cc: Jason Cooper, Thomas Gleixner, Marc Zyngier, linux-kernel,
kernel-janitors
We forgot to set "err" on this error path.
Fixes: 9e543e22e204 ("irqchip: Add driver for Loongson-1 interrupt controller")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/irqchip/irq-ls1x.c | 1 +
1 file changed, 1 insertion(+)
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;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] irqchip/irq-ls1x: Missing error code in ls1x_intc_of_init()
2019-03-28 14:38 [PATCH] irqchip/irq-ls1x: Missing error code in ls1x_intc_of_init() Dan Carpenter
@ 2019-03-28 19:14 ` Mukesh Ojha
2019-03-29 6:21 ` [PATCH v2] " Dan Carpenter
0 siblings, 1 reply; 5+ messages in thread
From: Mukesh Ojha @ 2019-03-28 19:14 UTC (permalink / raw)
To: Dan Carpenter, Marc Zyngier, Jiaxun Yang
Cc: Jason Cooper, Thomas Gleixner, linux-kernel, kernel-janitors
On 3/28/2019 8:08 PM, Dan Carpenter wrote:
> We forgot to set "err" on this error path.
What is "this" error path, please describe
like
"Currently, when irq_domain_add_linear() fails, error code does not get
set due to which
it return zero which is wrong.Fix it by setting appropriate error code."
> Fixes: 9e543e22e204 ("irqchip: Add driver for Loongson-1 interrupt controller")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Other wise change looks good .
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
-Mukesh
> ---
> drivers/irqchip/irq-ls1x.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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;
> }
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] irqchip/irq-ls1x: Missing error code in ls1x_intc_of_init()
2019-03-28 19:14 ` Mukesh Ojha
@ 2019-03-29 6:21 ` Dan Carpenter
2019-03-31 4:03 ` Jiaxun Yang
2019-04-05 12:43 ` [tip:irq/urgent] " tip-bot for Dan Carpenter
0 siblings, 2 replies; 5+ messages in thread
From: Dan Carpenter @ 2019-03-29 6:21 UTC (permalink / raw)
To: Marc Zyngier, Jiaxun Yang
Cc: Jason Cooper, Thomas Gleixner, Marc Zyngier, linux-kernel,
kernel-janitors, Mukesh Ojha
Currently, when irq_domain_add_linear() fails, the error code does not
get so it returns zero which is wrong. Fix it by setting appropriate
error code.
Fixes: 9e543e22e204 ("irqchip: Add driver for Loongson-1 interrupt controller")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
---
V2: Improve the commit message
drivers/irqchip/irq-ls1x.c | 1 +
1 file changed, 1 insertion(+)
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;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] irqchip/irq-ls1x: Missing error code in ls1x_intc_of_init()
2019-03-29 6:21 ` [PATCH v2] " Dan Carpenter
@ 2019-03-31 4:03 ` Jiaxun Yang
2019-04-05 12:43 ` [tip:irq/urgent] " tip-bot for Dan Carpenter
1 sibling, 0 replies; 5+ messages in thread
From: Jiaxun Yang @ 2019-03-31 4:03 UTC (permalink / raw)
To: Dan Carpenter, Marc Zyngier
Cc: Jason Cooper, Thomas Gleixner, linux-kernel, kernel-janitors,
Mukesh Ojha
Acked-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Thanks!
--
Jiaxun Yang
在 2019/3/29 14:21, Dan Carpenter 写道:
> Currently, when irq_domain_add_linear() fails, the error code does not
> get so it returns zero which is wrong. Fix it by setting appropriate
> error code.
>
> Fixes: 9e543e22e204 ("irqchip: Add driver for Loongson-1 interrupt controller")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
> ---
> V2: Improve the commit message
>
> drivers/irqchip/irq-ls1x.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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;
> }
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip:irq/urgent] irqchip/irq-ls1x: Missing error code in ls1x_intc_of_init()
2019-03-29 6:21 ` [PATCH v2] " Dan Carpenter
2019-03-31 4:03 ` Jiaxun Yang
@ 2019-04-05 12:43 ` tip-bot for Dan Carpenter
1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Dan Carpenter @ 2019-04-05 12:43 UTC (permalink / raw)
To: linux-tip-commits
Cc: tglx, mojha, jason, marc.zyngier, dan.carpenter, hpa, mingo,
jiaxun.yang, linux-kernel
Commit-ID: 95c5c618fa4349b2ba13aebeabf71911208dfc5e
Gitweb: https://git.kernel.org/tip/95c5c618fa4349b2ba13aebeabf71911208dfc5e
Author: Dan Carpenter <dan.carpenter@oracle.com>
AuthorDate: Fri, 29 Mar 2019 09:21:37 +0300
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 5 Apr 2019 14:37:56 +0200
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
---
drivers/irqchip/irq-ls1x.c | 1 +
1 file changed, 1 insertion(+)
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;
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-04-05 12:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-28 14:38 [PATCH] irqchip/irq-ls1x: Missing error code in ls1x_intc_of_init() Dan Carpenter
2019-03-28 19:14 ` Mukesh Ojha
2019-03-29 6:21 ` [PATCH v2] " Dan Carpenter
2019-03-31 4:03 ` Jiaxun Yang
2019-04-05 12:43 ` [tip:irq/urgent] " tip-bot for Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).