clocksource/drivers/h8300_timer16: Fix irq return value check
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 9 Nov 2015 09:52:35 +0000 (10:52 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 15 Dec 2015 08:42:26 +0000 (09:42 +0100)
The function irq_of_parse_and_map returns zero in case of failure.

Fix the return code test to check against zero.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/h8300_timer16.c

index 6705bf784d84761edbfe58172adf94983f5feab3..129dca02b3ee64cb48eaef6a06c0b2af2db4ef1d 100644 (file)
@@ -155,7 +155,7 @@ static void __init h8300_16timer_init(struct device_node *node)
        }
 
        irq = irq_of_parse_and_map(node, 0);
-       if (irq < 0) {
+       if (!irq) {
                pr_err("failed to get irq for clockevent\n");
                goto unmap_comm;
        }