From patchwork Wed Jun 21 21:52:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9803025 X-Patchwork-Delegate: bhelgaas@google.com 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 B2579601C0 for ; Wed, 21 Jun 2017 21:54:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4680274D1 for ; Wed, 21 Jun 2017 21:54:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 986662853C; Wed, 21 Jun 2017 21:54:00 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham 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 3A97428372 for ; Wed, 21 Jun 2017 21:54:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751689AbdFUVx7 (ORCPT ); Wed, 21 Jun 2017 17:53:59 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:53456 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751108AbdFUVx6 (ORCPT ); Wed, 21 Jun 2017 17:53:58 -0400 Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0M6mdY-1dkiA43yrc-00wRbr; Wed, 21 Jun 2017 23:53:25 +0200 From: Arnd Bergmann To: Lorenzo Pieralisi , Bjorn Helgaas Cc: linux-pci@vger.kernel.org, Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning Date: Wed, 21 Jun 2017 23:52:59 +0200 Message-Id: <20170621215323.3921382-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:XDXUefD88JbViQAdC3Yx2C8Roo5q3Zsojltei+Igvo5hnog2FWR F/H9O7ne2MJ9px2p18u3fIL3rYjT9nYwpHdX1IXdCYNPd60NAZ0ck4JZq/T1VaX/ZAruEjN wQqed1mCnnfvEqeLNZ5TL4yCqJkEPO64qr0fctkJujYsAENS691q1mk+Rc7HcMpjNlw0rc1 x5zkLEgEs0W+BTR8kDXYg== X-UI-Out-Filterresults: notjunk:1; V01:K0:nkDMPzOQ6ig=:u9P67+yH7H89rJTqEdZMlK EgPHCE9D7K8H3qCNH7Se6JtEzZTKsXKBBQv+D9YXIIVb4qOHeAthqhfjWQuym7JWSzwrDfQA0 kGlBckBgHv4lsnhSZD/3GrP9o24yaIhrSXfKablMp7pz/R8tCCliXvudOW2JWXrQODdpq2MHg +VDntXEXxPd4DfH9CDrrLxpkC1Xb+A0jc1y/+0s8wSWeVRHPPw3hpvrc5/3J1pBNi8GQzYhgK nzW5xTFQvWLv8VMdb6xporV46fPihi1PabrofivIWN83aMg77glahNXei5TJYO6IkmKUtmwUJ oZhcemZJ9xp8P+HUBU0nDV7V2OJZk6R6TXVmMLBXEbrgBYP16L6o50RnBLMw+1PohhR4pTLT6 3cydwBO6bYoYvHErWqQdkKa0GRS1K9e9yA/cHbi3IeoKYAnY7O5JCJgYMjpz6p6+SYYij6kbD 3RhYvfUVKNrFUpGu1fKvY7+4y9qgTUxniMomvqOrn4RlTV9OduXlSKK94Y/9PrTlAi3/TF+k3 yDklrL1o9QmpzS8uqqBsvefQWTr6XknH5nsnvE3ThjwZHfW36TV+SJGFtyeTSkUNr9sQTnaJa G47P1UlNrVgM9zbcB/EDg+uLR3JKz1rBKxFCDEl9x3NWg+S4YMijYv1qxlo7OVJoRbdMvcOqE OpROPE0PMjyErIXoRLSp82AzrCw7OIEW7hVg/cHpxI2sPhuit9CEoakMW+pdF0GHJrgM= Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The last rework returned a variable that the compiler cannot prove to be initialized: arch/arm/mach-iop13xx/pci.c: In function 'iop13xx_scan_bus': arch/arm/mach-iop13xx/pci.c:509:17: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] In the switch statement that sets the return value, this adds a default returning an error. Fixes: ace27646da8e ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()") Signed-off-by: Arnd Bergmann --- arch/arm/mach-iop13xx/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c index b97879bfb81a..3c51a9bb9b49 100644 --- a/arch/arm/mach-iop13xx/pci.c +++ b/arch/arm/mach-iop13xx/pci.c @@ -553,6 +553,8 @@ int iop13xx_scan_bus(int nr, struct pci_host_bridge *bridge) if (!ret) pci_bus_atue = bridge->bus; break; + default: + ret = -EINVAL; } return ret;