Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759593AbcJQWWE (ORCPT ); Mon, 17 Oct 2016 18:22:04 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:51495 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757193AbcJQWSz (ORCPT ); Mon, 17 Oct 2016 18:18:55 -0400 From: Arnd Bergmann To: Ley Foon Tan Cc: Linus Torvalds , linux-kernel@vger.kernel.org, Arnd Bergmann , Daniel Lezcano , nios2-dev@lists.rocketboards.org Subject: [PATCH 26/28] nios2: fix timer initcall return value Date: Tue, 18 Oct 2016 00:16:14 +0200 Message-Id: <20161017221650.1902729-7-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20161017220342.1627073-1-arnd@arndb.de> References: <20161017220342.1627073-1-arnd@arndb.de> X-Provags-ID: V03:K0:AvEP2Fa1yQTwK0xnO9hi2mAytEf8WYGfst8XauF0Kf/u4cKlFtd rPSxdLLfrufxZyiCmqxlxgOSv5BllE7+Phc4zoFqx3I8HOtkQrRhKXxMTQ/eX45S66E3gzo sk1maAZz7I7COfkfEPf7G8+JTZsoOIc4uTcNam77Uslb7LY1jCnnTjNL5xEcKzoBC4AOmIz QkBtcRmPSrh1/2qu12o1A== X-UI-Out-Filterresults: notjunk:1;V01:K0:lDa8kaZuBQE=:TLIdbrwjDtA99oWeJGMZ5+ liKYhgiFyeakvMDw72I/QcqXBss3FKH2NfA1+GNvYHbAOf0UeA1cYs0Q5KjpX23jad48L2XpL TRK3UZ5DacTF2rxMPqIFDS7oAzbK1gwQb5X+1cLsl0XvVsZv1o7LaRxPEFAgOJzqb3eXyCqW4 izra2tXGTBRVqoA5ecumRqi+WRPXtxuYTJJTrl1Y2MMfpUiYGADjwwWdGBBdAq+il9PmrY5nB aqe11lyu3nMQFHqT6ijRKplYzVxGvdkWRo8rHlEcZzR1tL9vxV4dUJz8XeFKN5IVWuC6jIrWh OnXL08rXRwx5Jav84UZxPD23CMgyJg3ny3nCqdHPot3d4JXuBLwKkAgeBQlXadCIyJsmJh61F 5ZoCI8/Xh0KO1X97z7lP65P1UCQCcWTQ9VxlR+B6xZ+J9gEyGyOd44MTDfrZFtwegS9+CHrYf KNtsMjjxXOfGqwrOPYQLIkIVJDJxUkdktd8MUj9rRJ4+MZmu0v2UsVG9/YAwXBakb5QwmdhOs hSvz4Y/XjTs5HkvVI8cxiIVZ/5VJGZhvo0yBNuFfevpUz+DLR1aCNFj68ae9bFWZiMZ1RJ7uB bJxUkF9j7kLYyUht7quzQeXh53HOUfQD/hPsr+G2CMVDifx4B76UMhfT3j9yIwbC72Xl4CYLK dOOMg5SUTiIoO/hM9ho+bdZ71/2YGltUGaVeGAqPYiNoDOUnYKQJZbF8VigADRulpYgk= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 742 Lines: 27 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. Signed-off-by: Arnd Bergmann --- 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