summaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-sni-exiu.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2017-11-14 09:57:28 +0300
committerThomas Gleixner <tglx@linutronix.de>2017-11-14 13:27:22 +0300
commit0e54705b0e01dcaf3eb2a496bb66d5f05012056b (patch)
tree4009c0031c144d5991a9c8623dadb36de7396650 /drivers/irqchip/irq-sni-exiu.c
parent41cc30412d6692c25506bf2d4e65c4364c70c10a (diff)
downloadlinux-0e54705b0e01dcaf3eb2a496bb66d5f05012056b.tar.xz
irqchip/exiu: Fix return value check in exiu_init()
In case of error, the function of_iomap() returns NULL pointer not ERR_PTR(). Replace the IS_ERR() test of the return value with NULL test and return a proper error code. Fixes: 706cffc1b912 ("irqchip/exiu: Add support for Socionext Synquacer EXIU controller") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Jason Cooper <jason@lakedaemon.net> Link: https://lkml.kernel.org/r/1510642648-123574-1-git-send-email-weiyongjun1@huawei.com
Diffstat (limited to 'drivers/irqchip/irq-sni-exiu.c')
-rw-r--r--drivers/irqchip/irq-sni-exiu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/irqchip/irq-sni-exiu.c b/drivers/irqchip/irq-sni-exiu.c
index 1b6e2f7c59af..1927b2f36ff6 100644
--- a/drivers/irqchip/irq-sni-exiu.c
+++ b/drivers/irqchip/irq-sni-exiu.c
@@ -196,8 +196,8 @@ static int __init exiu_init(struct device_node *node,
}
data->base = of_iomap(node, 0);
- if (IS_ERR(data->base)) {
- err = PTR_ERR(data->base);
+ if (!data->base) {
+ err = -ENODEV;
goto out_free;
}