* [PATCH] irqchip: irq-mtk-sysirq: Make mtk_sysirq_of_init return error if ioremap fails
@ 2015-05-21 14:57 Axel Lin
2015-05-21 15:36 ` Matthias Brugger
2015-05-22 9:10 ` [tip:irq/core] irqchip: mtk-sysirq: " tip-bot for Axel Lin
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2015-05-21 14:57 UTC (permalink / raw)
To: Thomas Gleixner, Jason Cooper
Cc: Yingjoe Chen, Matthias Brugger, linux-kernel,
linux-mediatek@lists.infradead.org
PTR_ERR(NULL) returns 0 so current code returns 0 if ioremap fails, fix it.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/irqchip/irq-mtk-sysirq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sysirq.c
index 04de2d4..15c1303 100644
--- a/drivers/irqchip/irq-mtk-sysirq.c
+++ b/drivers/irqchip/irq-mtk-sysirq.c
@@ -144,7 +144,7 @@ static int __init mtk_sysirq_of_init(struct device_node *node,
chip_data->intpol_base = ioremap(res.start, size);
if (!chip_data->intpol_base) {
pr_err("mtk_sysirq: unable to map sysirq register\n");
- ret = PTR_ERR(chip_data->intpol_base);
+ ret = -ENXIO;
goto out_free;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] irqchip: irq-mtk-sysirq: Make mtk_sysirq_of_init return error if ioremap fails
2015-05-21 14:57 [PATCH] irqchip: irq-mtk-sysirq: Make mtk_sysirq_of_init return error if ioremap fails Axel Lin
@ 2015-05-21 15:36 ` Matthias Brugger
2015-05-22 9:10 ` [tip:irq/core] irqchip: mtk-sysirq: " tip-bot for Axel Lin
1 sibling, 0 replies; 3+ messages in thread
From: Matthias Brugger @ 2015-05-21 15:36 UTC (permalink / raw)
To: Axel Lin
Cc: Thomas Gleixner, Jason Cooper, Yingjoe Chen,
linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org
2015-05-21 16:57 GMT+02:00 Axel Lin <axel.lin@ingics.com>:
> PTR_ERR(NULL) returns 0 so current code returns 0 if ioremap fails, fix it.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:irq/core] irqchip: mtk-sysirq: Make mtk_sysirq_of_init return error if ioremap fails
2015-05-21 14:57 [PATCH] irqchip: irq-mtk-sysirq: Make mtk_sysirq_of_init return error if ioremap fails Axel Lin
2015-05-21 15:36 ` Matthias Brugger
@ 2015-05-22 9:10 ` tip-bot for Axel Lin
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Axel Lin @ 2015-05-22 9:10 UTC (permalink / raw)
To: linux-tip-commits
Cc: jason, tglx, linux-kernel, axel.lin, mingo, matthias.bgg,
yingjoe.chen, linux-mediatek, hpa
Commit-ID: e1a96fb861b0781c8ef66a76d0fc6fb6f628f84c
Gitweb: http://git.kernel.org/tip/e1a96fb861b0781c8ef66a76d0fc6fb6f628f84c
Author: Axel Lin <axel.lin@ingics.com>
AuthorDate: Thu, 21 May 2015 22:57:34 +0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 22 May 2015 11:06:47 +0200
irqchip: mtk-sysirq: Make mtk_sysirq_of_init return error if ioremap fails
PTR_ERR(NULL) returns 0 so current code returns 0 if ioremap fails, fix it.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Yingjoe Chen <yingjoe.chen@mediatek.com>
Cc: linux-mediatek@lists.infradead.org <linux-mediatek@lists.infradead.org>
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/1432220254.29544.1.camel@ingics.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
drivers/irqchip/irq-mtk-sysirq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sysirq.c
index 04de2d4..15c1303 100644
--- a/drivers/irqchip/irq-mtk-sysirq.c
+++ b/drivers/irqchip/irq-mtk-sysirq.c
@@ -144,7 +144,7 @@ static int __init mtk_sysirq_of_init(struct device_node *node,
chip_data->intpol_base = ioremap(res.start, size);
if (!chip_data->intpol_base) {
pr_err("mtk_sysirq: unable to map sysirq register\n");
- ret = PTR_ERR(chip_data->intpol_base);
+ ret = -ENXIO;
goto out_free;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-22 9:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-21 14:57 [PATCH] irqchip: irq-mtk-sysirq: Make mtk_sysirq_of_init return error if ioremap fails Axel Lin
2015-05-21 15:36 ` Matthias Brugger
2015-05-22 9:10 ` [tip:irq/core] irqchip: mtk-sysirq: " tip-bot for Axel Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox