]> git.baikalelectronics.ru Git - kernel.git/commit
nios2: fix timer initcall return value
authorArnd Bergmann <arnd@arndb.de>
Thu, 10 Nov 2016 16:44:47 +0000 (17:44 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 11 Nov 2016 16:45:08 +0000 (08:45 -0800)
commit26cce03eecac0ca4a6ead2e5ed46dae08f2b5928
treea841408d00fa789c3fb9c87716a4a7f0b1821482
parent62bdfbcdef3f4b804d1c61f2b06e434eb634b966
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>
arch/nios2/kernel/time.c