From patchwork Thu Nov 10 16:44:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9421547 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A33E660512 for ; Thu, 10 Nov 2016 16:49:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A701929504 for ; Thu, 10 Nov 2016 16:49:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B9AB29772; Thu, 10 Nov 2016 16:49:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7E742976F for ; Thu, 10 Nov 2016 16:49:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964859AbcKJQrk (ORCPT ); Thu, 10 Nov 2016 11:47:40 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:55355 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935110AbcKJQrh (ORCPT ); Thu, 10 Nov 2016 11:47:37 -0500 Received: from wuerfel.lan ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0LzTlq-1crk1u1tbe-014i3R; Thu, 10 Nov 2016 17:45:40 +0100 From: Arnd Bergmann To: Linus Torvalds Cc: Andrew Morton , Arnd Bergmann , Anna Schumaker , "David S. Miller" , Herbert Xu , Ilya Dryomov , Javier Martinez Canillas , Jiri Kosina , Jonathan Cameron , Ley Foon Tan , "Luis R . Rodriguez" , Martin Schwidefsky , Mauro Carvalho Chehab , Michal Marek , Russell King , Sean Young , Sebastian Ott , Trond Myklebust , x86@kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, nios2-dev@lists.rocketboards.org, linux-s390@vger.kernel.org, linux-crypto@vger.kernel.org, linux-media@vger.kernel.org, linux-nfs@vger.kernel.org Subject: [PATCH v2 04/11] nios2: fix timer initcall return value Date: Thu, 10 Nov 2016 17:44:47 +0100 Message-Id: <20161110164454.293477-5-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20161110164454.293477-1-arnd@arndb.de> References: <20161110164454.293477-1-arnd@arndb.de> X-Provags-ID: V03:K0:yBZul8vSPebUoQV9gsBOA5brnXGVrkdtd3lc191y03wW8ld4loT +HWZQ5UYFH5sJVy/2QURcpJyrTA/gllhHU3hCKQ2FKqkuFwPiqRJUeoo0+BPOHeE9jkppd3 GmuJZ85kJmWTSYwkooUZhMFBLVWwz2AuILZuNlaWQitt/j3vBLwjeqaFGhRHcNBIt/nK0it wTdJptLfoh8TtDft7Zirg== X-UI-Out-Filterresults: notjunk:1; V01:K0:02CAhnauOZM=:cRThe4uLJPdAW1dTO/AoFA +GlMqR+i6qnY9DmBWXbQpvAlJD9EF2gsh6whDuMOE98eOIAzoPow61XWecIYyzH7yo6qlBb/e omsaCrzWB6V5lr1kXF1DJ4GFPgvusJnwu7ZmcIKWPNGqwBxCCGvsUkQWO5iIXkJKOiYNCHfRs i0Ir91W6mg+kHrDz+jACyO5u7ch7hYhi3xlvlCKzVadm+cQuE0EpKPWaQT7VqqX1exvJQIVqe 8Ypc+0T5zPz9F6PznaCuOmlCc4qaXmhpr+B6QdbZ1CVs3yQZS1SnJlJMzv8f76APG9mCiKTTX oEBhbx1BW+s4ficD47vx7fdPqM073wpapKB9l1JeiWVZXRGwuRh/uvh4T0p0MB/CH4pmCzypk WtL016kWWxH3dUtiJirVhikw6kH6np0sS/o9CeNDDPIV+A4QwL0MrR8CX1FNkMitFSUwqaeY8 APwtNLlxNnv2zyEsljn7o3aicGVDqcYRTlGIb9BOjn4oef7l3jnyEO5abLJSRYMiOrpjnITcW +xfEZeOuAz5h56fBp/vzHxQ/SPDxQTGws5YuS42vzY1SP7bkhDP2V/JfPVDS2FVU3KeqtDVGK kbYYJ3z/KNPwg2Ly3AZJD+tzd+1G29beqZwOgKnxg3Y28ljCko/Ipu6WEj7o7dXHD2K40p/3h NZX+9JJIrTN7l230iLpsy+bs8dqeprKTEgzPuPh01+BbfZP+zqxJ49BYvEdbLwXXfnDo= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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; }