diff options
author | Baruch Siach <baruch@tkos.co.il> | 2013-05-29 10:11:17 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-25 14:07:29 -0700 |
commit | f707f7ae37c514a3871741747bfd8c09d7badb05 (patch) | |
tree | ab4dadfffc2a4ab3047898790ded27f6cd2c75b8 /drivers/clocksource | |
parent | 084c895d3c9fecf80fe02ba442b90818116b30d2 (diff) | |
download | linux-3.10-f707f7ae37c514a3871741747bfd8c09d7badb05.tar.gz linux-3.10-f707f7ae37c514a3871741747bfd8c09d7badb05.tar.bz2 linux-3.10-f707f7ae37c514a3871741747bfd8c09d7badb05.zip |
clocksource: dw_apb: Fix error check
commit 1a33bd2be705cbb3f57d7223b60baea441039307 upstream.
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.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r-- | drivers/clocksource/dw_apb_timer_of.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clocksource/dw_apb_timer_of.c b/drivers/clocksource/dw_apb_timer_of.c index ab09ed3742e..6b02eddc5f5 100644 --- a/drivers/clocksource/dw_apb_timer_of.c +++ b/drivers/clocksource/dw_apb_timer_of.c @@ -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); |