Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clocksource: dw_apb: Fix error check

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>

authored by

Baruch Siach and committed by
Daniel Lezcano
1a33bd2b 1eaff672

+1 -1
+1 -1
drivers/clocksource/dw_apb_timer_of.c
··· 44 44 u32 irq, rate; 45 45 46 46 irq = irq_of_parse_and_map(event_timer, 0); 47 - if (irq == NO_IRQ) 47 + if (irq == 0) 48 48 panic("No IRQ for clock event timer"); 49 49 50 50 timer_get_base_and_rate(event_timer, &iobase, &rate);