1
0
Fork 0

clocksource/drivers/h8300_timer16: Fix irq return value check

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>
hifive-unleashed-5.1
Daniel Lezcano 2015-11-09 10:52:35 +01:00
parent 903e5fd3f8
commit 5019c90232
1 changed files with 1 additions and 1 deletions

View 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;
}