aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Lin <[email protected]>2015-05-21 22:57:34 +0800
committerThomas Gleixner <[email protected]>2015-05-22 11:06:47 +0200
commite1a96fb861b0781c8ef66a76d0fc6fb6f628f84c (patch)
treeae82549fb97cae1a908d3993432ecedf2602283f
parenta6c761e44cfdeffc31785c698aa04d310e7cd686 (diff)
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 <[email protected]> Reviewed-by: Matthias Brugger <[email protected]> Cc: Yingjoe Chen <[email protected]> Cc: [email protected] <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
-rw-r--r--drivers/irqchip/irq-mtk-sysirq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sysirq.c
index 04de2d4ca70f..15c13039bba2 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;
}