瀏覽代碼

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>
Daniel Lezcano 9 年之前
父節點
當前提交
5019c90232
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/clocksource/h8300_timer16.c

+ 1 - 1
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);
 	irq = irq_of_parse_and_map(node, 0);
-	if (irq < 0) {
+	if (!irq) {
 		pr_err("failed to get irq for clockevent\n");
 		pr_err("failed to get irq for clockevent\n");
 		goto unmap_comm;
 		goto unmap_comm;
 	}
 	}