summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2015-11-09 10:52:35 +0100
committerDaniel Lezcano <daniel.lezcano@linaro.org>2015-12-15 09:42:26 +0100
commit5019c9023251efd3bfa22b1090d8ad1901914c93 (patch)
tree39319edf81620ee7a70238aab4c4186822fb7e5f /drivers/clocksource
parentclocksource/drivers/h8300_timer16: Remove unused fields in timer16_priv (diff)
downloadlinux-5019c9023251efd3bfa22b1090d8ad1901914c93.tar.xz
linux-5019c9023251efd3bfa22b1090d8ad1901914c93.zip
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>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r--drivers/clocksource/h8300_timer16.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clocksource/h8300_timer16.c b/drivers/clocksource/h8300_timer16.c
index 6705bf784d84..129dca02b3ee 100644
--- a/drivers/clocksource/h8300_timer16.c
+++ b/drivers/clocksource/h8300_timer16.c
@@ -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;
}