From patchwork Wed Mar 8 23:37:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 9612103 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 3D4796016C for ; Wed, 8 Mar 2017 23:39:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F90828633 for ; Wed, 8 Mar 2017 23:39:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 244D728640; Wed, 8 Mar 2017 23:39: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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 8FFE428633 for ; Wed, 8 Mar 2017 23:39:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754580AbdCHXjF (ORCPT ); Wed, 8 Mar 2017 18:39:05 -0500 Received: from mail-pf0-f169.google.com ([209.85.192.169]:34374 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752211AbdCHXjE (ORCPT ); Wed, 8 Mar 2017 18:39:04 -0500 Received: by mail-pf0-f169.google.com with SMTP id v190so20802168pfb.1 for ; Wed, 08 Mar 2017 15:38:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=B6KekmhpcmpOIsXoiPzpq895I0lQJynMplp+bOb82+4=; b=Eu2plSH9YWH05taQy4sHc8+miD/GnYpq9jzToV3UVJQg3xCX906uV7Mh/Rj9rNxz86 vmaQQ+vKIOjyMDDHxhyGJE+gBWt+Vo1EISYz20tAaCckJMvzYMdu1chyki1o7mNa0JPI qX48Ufe4YGuNuIQgtOenlAD25kPJIZW4/tWGI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=B6KekmhpcmpOIsXoiPzpq895I0lQJynMplp+bOb82+4=; b=nl2gsfueSHsjahgEUW/Z9Y/BfUtfn6LPPQR81GM8dfRIuVBZ5Ic8xlMYVwbPaN29Oj EBK7p6GEnNiJwRs87CpQqPnIKcv2vg0R1+LTu6VQ3bbPlHGNFhHFuOOvkwRRuFDrROAA VRFNxe49bAqDFIt9u1gP3GYh+L7vWKJ0f65WVYRdc/wkE7uIQRCg4CLZwMcL8oZmitXE KAa3zXe1Cke68ceKRXdb5/G2btKEFT1ae674UPF7WIM16JeQSJft/4l3RzaNNALsQr2d lhDdd3ulf0Drn8LtpgBE/sDA7spWfpHnDk9Wew3K3JOG6SrVQ4SiMRNmQOhsHBq9vEYX t5RQ== X-Gm-Message-State: AMke39kath1/NkVei7seE4La7z4uDALJgd7a0Qa0aUj9Vurx/jI0X5mq1+h7SSu2/Fc/9v0I X-Received: by 10.99.49.70 with SMTP id x67mr10052001pgx.128.1489016281104; Wed, 08 Mar 2017 15:38:01 -0800 (PST) Received: from ban.mtv.corp.google.com ([172.22.64.120]) by smtp.gmail.com with ESMTPSA id m21sm8266533pgh.4.2017.03.08.15.38.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Mar 2017 15:38:00 -0800 (PST) From: Brian Norris To: Bjorn Helgaas Cc: , Brian Norris , Shawn Lin , Jeffy Chen , Wenrui Li , linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, Brian Norris Subject: [PATCH 2/3] PCI: rockchip: make 'return 0' more obvious in probe() Date: Wed, 8 Mar 2017 15:37:47 -0800 Message-Id: <20170308233748.54706-2-briannorris@chromium.org> X-Mailer: git-send-email 2.12.0.246.ga2ecc84866-goog In-Reply-To: <20170308233748.54706-1-briannorris@chromium.org> References: <20170308233748.54706-1-briannorris@chromium.org> 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 There's no way to get here with 'err != 0'. Just return 0 to be more obvious and prevent future changes from accidentally erroring out here without going through the right error paths. Signed-off-by: Brian Norris --- drivers/pci/host/pcie-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c index d785f64ec03b..5d7b27b1e941 100644 --- a/drivers/pci/host/pcie-rockchip.c +++ b/drivers/pci/host/pcie-rockchip.c @@ -1398,7 +1398,7 @@ static int rockchip_pcie_probe(struct platform_device *pdev) pcie_bus_configure_settings(child); pci_bus_add_devices(bus); - return err; + return 0; err_free_res: pci_free_resource_list(&res);