Skip to content

Commit

Permalink
irqchip/exiu: Fix return value check in exiu_init()
Browse files Browse the repository at this point in the history
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: 706cffc ("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
  • Loading branch information
Wei Yongjun authored and Thomas Gleixner committed Nov 14, 2017
1 parent 41cc304 commit 0e54705
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/irqchip/irq-sni-exiu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0e54705

Please sign in to comment.