From patchwork Sun Jul 16 06:39:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 9842763 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 754F96037F for ; Sun, 16 Jul 2017 06:40:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F50F28526 for ; Sun, 16 Jul 2017 06:40:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 540B52857B; Sun, 16 Jul 2017 06:40:17 +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 F105528526 for ; Sun, 16 Jul 2017 06:40:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750842AbdGPGj5 (ORCPT ); Sun, 16 Jul 2017 02:39:57 -0400 Received: from mail-pf0-f170.google.com ([209.85.192.170]:35114 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751211AbdGPGjy (ORCPT ); Sun, 16 Jul 2017 02:39:54 -0400 Received: by mail-pf0-f170.google.com with SMTP id e199so1807147pfh.2 for ; Sat, 15 Jul 2017 23:39:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=reoU3j+OkLiKd0WioZU7oEExYEuEXvEvRRrD9DWjNs0=; b=ZUS/POGFHgaZwXW43Q6Z9L02LFM+IlN2PvLLh7L6KddnZ7L6Y+B+ITrUY80hnm7pv9 M7UCyRlObJD8FCnQPnN6mRqms6ZzrCQpnP4ZNrswCpcVgJbL2nHS9Rxkbj+pszl9QH0s N/Ja64CIM6YYDZ5iN7AqInZmpiJUy3y4XOHZk= 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=reoU3j+OkLiKd0WioZU7oEExYEuEXvEvRRrD9DWjNs0=; b=UtVGLdkrhA2Xf2eSXR2mxrcIUep0mKxVnLGqJCe10loSBHAcwEAG0jRPRAdTZ1MhY6 iY5XLwdg3WNpHUlHbBa4JHwlk7Dr5/c/OpqNHGuhlCxm20VLcJu8IM/y9lY2QBuY5tEY 8qqG3wz058iDalG3CcEwtAs988GeOupBYxKvgGrLLxgie1P7RKl8qG8PwPtjnztjD77p gULyBE5wmyFvRhiCq75gkEDs03UYR/dUPOC1zjregqoG1L/4X/GfqsUZQoEXPGfgBGQ9 AKZ3dd0eI7Qo0GWX/YHdjAOFYzZEjNUeifQ0GHu84BXp36+m113hEYkCmsU5OfkSKaW6 seKg== X-Gm-Message-State: AIVw113jkfOAZHxNwm0GbsSC9TE4Vq+c15USh+I0hq+lvTUhFUYfqGr5 QgNXUu68ev+DKjne X-Received: by 10.99.173.70 with SMTP id y6mr23546583pgo.9.1500187193850; Sat, 15 Jul 2017 23:39:53 -0700 (PDT) Received: from localhost.localdomain (ip68-111-217-79.sd.sd.cox.net. [68.111.217.79]) by smtp.gmail.com with ESMTPSA id l8sm13391910pgs.30.2017.07.15.23.39.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Jul 2017 23:39:53 -0700 (PDT) From: Bjorn Andersson To: Stanimir Varbanov , Bjorn Helgaas Cc: linux-pci@vger.kernel.org (open list:PCIE DRIVER FOR QUALCOMM MSM), linux-arm-msm@vger.kernel.org (open list:PCIE DRIVER FOR QUALCOMM MSM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/3] PCI: qcom: Don't unroll init if init fails Date: Sat, 15 Jul 2017 23:39:46 -0700 Message-Id: <20170716063947.3272-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170716063947.3272-1-bjorn.andersson@linaro.org> References: <20170716063947.3272-1-bjorn.andersson@linaro.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 When the init op fails it will restore the state of the resources, so we should not disable them one more time when this happens. Signed-off-by: Bjorn Andersson Acked-by: Stanimir Varbanov --- drivers/pci/dwc/pcie-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/dwc/pcie-qcom.c b/drivers/pci/dwc/pcie-qcom.c index d15657dc3990..7b703741a3fd 100644 --- a/drivers/pci/dwc/pcie-qcom.c +++ b/drivers/pci/dwc/pcie-qcom.c @@ -901,7 +901,7 @@ static int qcom_pcie_host_init(struct pcie_port *pp) ret = pcie->ops->init(pcie); if (ret) - goto err_deinit; + return ret; ret = phy_power_on(pcie->phy); if (ret)