]> git.karo-electronics.de Git - linux-beck.git/commitdiff
clocksource/drivers/h8300_timer8: Fix irq return value check
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Sun, 8 Nov 2015 16:56:18 +0000 (17:56 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 15 Dec 2015 08:42:14 +0000 (09:42 +0100)
The value returned in case of error for the 'irq_of_parse_and_map' function is
zero in case of error. Fix the check in the init code.

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

index 2433325bd38f9a2ca8d8eebd202a777af79e6843..3eedeffccc260d9e3bcd48ac9b965b67b1b66435 100644 (file)
@@ -230,7 +230,7 @@ static void __init h8300_8timer_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_reg;
        }