Commit 069013a9 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Linus Torvalds

nios2: fix timer initcall return value

When called more than twice, the nios2_time_init() function return an
uninitialized value, as detected by gcc -Wmaybe-uninitialized

  arch/nios2/kernel/time.c: warning: 'ret' may be used uninitialized in this function

This makes it return '0' here, matching the comment above the function.
Acked-by: default avatarLey Foon Tan <lftan@altera.com>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3a6d8676
...@@ -324,6 +324,7 @@ static int __init nios2_time_init(struct device_node *timer) ...@@ -324,6 +324,7 @@ static int __init nios2_time_init(struct device_node *timer)
ret = nios2_clocksource_init(timer); ret = nios2_clocksource_init(timer);
break; break;
default: default:
ret = 0;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment