diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-11-10 17:44:47 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-11 17:45:08 +0100 |
commit | 069013a9e2bbf1ace3f796cb664023dcd40730f7 (patch) | |
tree | a841408d00fa789c3fb9c87716a4a7f0b1821482 /arch | |
parent | x86: apm: avoid uninitialized data (diff) | |
download | linux-069013a9e2bbf1ace3f796cb664023dcd40730f7.tar.xz linux-069013a9e2bbf1ace3f796cb664023dcd40730f7.zip |
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: Ley Foon Tan <lftan@altera.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/nios2/kernel/time.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/nios2/kernel/time.c b/arch/nios2/kernel/time.c index d9563ddb337e..746bf5caaffc 100644 --- a/arch/nios2/kernel/time.c +++ b/arch/nios2/kernel/time.c @@ -324,6 +324,7 @@ static int __init nios2_time_init(struct device_node *timer) ret = nios2_clocksource_init(timer); break; default: + ret = 0; break; } |