diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2015-11-08 19:56:18 +0300 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2015-12-15 11:42:14 +0300 |
commit | 54a0cd5a7e107ba0cf15a4fb876595d0c8a7faab (patch) | |
tree | 1543a9628df66a680f168a6cc65c3e32b29024fc /drivers/clocksource/h8300_timer8.c | |
parent | 1f058d52b3e32b919742d451c673b3ab71c487dc (diff) | |
download | linux-54a0cd5a7e107ba0cf15a4fb876595d0c8a7faab.tar.xz |
clocksource/drivers/h8300_timer8: Fix irq return value check
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>
Diffstat (limited to 'drivers/clocksource/h8300_timer8.c')
-rw-r--r-- | drivers/clocksource/h8300_timer8.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clocksource/h8300_timer8.c b/drivers/clocksource/h8300_timer8.c index 2433325bd38f..3eedeffccc26 100644 --- a/drivers/clocksource/h8300_timer8.c +++ b/drivers/clocksource/h8300_timer8.c @@ -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; } |