From patchwork Fri Mar 10 02:46:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 737233 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3vfWrV1ZwKz9s7v for ; Fri, 10 Mar 2017 13:47:22 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="GROolxhy"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754190AbdCJCrU (ORCPT ); Thu, 9 Mar 2017 21:47:20 -0500 Received: from mail-pg0-f54.google.com ([74.125.83.54]:35659 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752935AbdCJCrR (ORCPT ); Thu, 9 Mar 2017 21:47:17 -0500 Received: by mail-pg0-f54.google.com with SMTP id b129so33416999pgc.2 for ; Thu, 09 Mar 2017 18:46:30 -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=aR7O5BPVonXI1xu+Sf1xkREiBLonT4unp8UioDvhWak=; b=GROolxhy/RX5U4xV3v9/peOLT1xUuXyGlApKqnkihPsC03toFIco8q4psfr4JitrQ7 hqYEVBzGmM3kLf8MO0RGctzQXBvSFVxWA12CMJKU72T/qoXzKO9mZstBfvwN2hnJz8it Bq9Wci9SkQARmo9y6CoEWwaWqewkJvo7AN6Xc= 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=aR7O5BPVonXI1xu+Sf1xkREiBLonT4unp8UioDvhWak=; b=VRlhkvpl8BqLtApDq2L8Jvn2Lce8NQyJwpS2ArZRsHIIAUb9cD14lRQCZTQ/GP1nGI X8DfsYh7LGfabzqrOkDJlKumguSrUOj8xgV9DgMWMO/eY9Wxni5f57N0VR77vX8xk3Fd L3fPJ5NLVt0vyx9CXOkALPsTGqf0cSZU0xG8xpG4vzDoHrx++GCaYb/2UWr7wN34AO48 Dik7GE5XeEaKc5yyuvdt6RnPmXffmA8n5c4qeQFRsf/5RW60LKtgYz32bTWDXYvvyheK wDB0j71HYrkiB82wUstoUy0CVZAG1Tf7L3RK7JvMfP6Qsbkf9nlmyv8X76uZ5oPrQIXt ggPA== X-Gm-Message-State: AMke39lkPYnOmVT3zZFyDC29lGSy83G4KKGCbOdA1yIqJOwuDuNYTUrwDjxGSXvmF1Yci4D3 X-Received: by 10.84.241.69 with SMTP id u5mr21851993plm.107.1489113989941; Thu, 09 Mar 2017 18:46:29 -0800 (PST) Received: from ban.mtv.corp.google.com ([172.22.64.120]) by smtp.gmail.com with ESMTPSA id w29sm14830573pfi.131.2017.03.09.18.46.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Mar 2017 18:46:29 -0800 (PST) From: Brian Norris To: Bjorn Helgaas Cc: , Shawn Lin , Jeffy Chen , Wenrui Li , linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, Brian Norris Subject: [PATCH v2 2/5] PCI: rockchip: make 'return 0' more obvious in probe() Date: Thu, 9 Mar 2017 18:46:14 -0800 Message-Id: <20170310024617.67303-2-briannorris@chromium.org> X-Mailer: git-send-email 2.12.0.246.ga2ecc84866-goog In-Reply-To: <20170310024617.67303-1-briannorris@chromium.org> References: <20170310024617.67303-1-briannorris@chromium.org> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org 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 --- v2: no change --- 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);