Skip to content

Commit

Permalink
clocksource: dw_apb: Fix error check
Browse files Browse the repository at this point in the history
irq_of_parse_and_map() returns 0 on error, while the code checks for NO_IRQ.
This breaks on platforms that have NO_IRQ != 0.

Cc: <stable@vger.kernel.org>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
  • Loading branch information
Baruch Siach authored and Daniel Lezcano committed Jun 6, 2013
1 parent 1eaff67 commit 1a33bd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clocksource/dw_apb_timer_of.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static void add_clockevent(struct device_node *event_timer)
u32 irq, rate;

irq = irq_of_parse_and_map(event_timer, 0);
if (irq == NO_IRQ)
if (irq == 0)
panic("No IRQ for clock event timer");

timer_get_base_and_rate(event_timer, &iobase, &rate);
Expand Down

0 comments on commit 1a33bd2

Please sign in to comment.