diff options
author | Dmitry Torokhov <dtor@chromium.org> | 2014-11-17 11:36:23 +0100 |
---|---|---|
committer | Ley Foon Tan <lftan@altera.com> | 2014-12-08 05:56:08 +0100 |
commit | b29438f22c807d8a4bda6f0fb3e24318117906c0 (patch) | |
tree | 4e4b9045ec755225b5e4fb850739de3372056f8d /arch/nios2 | |
parent | nios2: Use IS_ENABLED instead of #ifdefs to check config symbols (diff) | |
download | linux-b29438f22c807d8a4bda6f0fb3e24318117906c0.tar.xz linux-b29438f22c807d8a4bda6f0fb3e24318117906c0.zip |
nios2: fix error handling of irq_of_parse_and_map
Return value of irq_of_parse_and_map() is unsigned int, with 0
indicating failure, so testing for negative result never works.
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
Diffstat (limited to 'arch/nios2')
-rw-r--r-- | arch/nios2/kernel/time.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/nios2/kernel/time.c b/arch/nios2/kernel/time.c index d90ca1b854e0..23729e81de4a 100644 --- a/arch/nios2/kernel/time.c +++ b/arch/nios2/kernel/time.c @@ -228,7 +228,7 @@ static __init void nios2_clockevent_init(struct device_node *timer) nios2_timer_get_base_and_freq(timer, &iobase, &freq); irq = irq_of_parse_and_map(timer, 0); - if (irq < 0) + if (!irq) panic("Unable to parse timer irq\n"); nios2_ce.timer.base = iobase; |