[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20161110164454.293477-5-arnd@arndb.de>
Date: Thu, 10 Nov 2016 17:44:47 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Arnd Bergmann <arnd@...db.de>,
Anna Schumaker <anna.schumaker@...app.com>,
"David S. Miller" <davem@...emloft.net>,
Herbert Xu <herbert@...dor.apana.org.au>,
Ilya Dryomov <idryomov@...il.com>,
Javier Martinez Canillas <javier@....samsung.com>,
Jiri Kosina <jikos@...nel.org>,
Jonathan Cameron <jic23@...nel.org>,
Ley Foon Tan <lftan@...era.com>,
"Luis R . Rodriguez" <mcgrof@...nel.org>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Michal Marek <mmarek@...e.com>,
Russell King <linux@...linux.org.uk>,
Sean Young <sean@...s.org>,
Sebastian Ott <sebott@...ux.vnet.ibm.com>,
Trond Myklebust <trond.myklebust@...marydata.com>,
x86@...nel.org, linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-snps-arc@...ts.infradead.org,
nios2-dev@...ts.rocketboards.org, linux-s390@...r.kernel.org,
linux-crypto@...r.kernel.org, linux-media@...r.kernel.org,
linux-nfs@...r.kernel.org
Subject: [PATCH v2 04/11] 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@...era.com>
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
arch/nios2/kernel/time.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/nios2/kernel/time.c b/arch/nios2/kernel/time.c
index d9563dd..746bf5c 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;
}
--
2.9.0
Powered by blists - more mailing lists