Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -324,6 +324,7 @@ static int __init nios2_time_init(struct device_node *timer)
		ret = nios2_clocksource_init(timer);
		break;
	default:
		ret = 0;
		break;
	}