diff mbox

[2/3] PCI: qcom: Don't unroll init if init fails

Message ID 20170716063947.3272-2-bjorn.andersson@linaro.org (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Bjorn Andersson July 16, 2017, 6:39 a.m. UTC
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 <bjorn.andersson@linaro.org>
---
 drivers/pci/dwc/pcie-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stanimir Varbanov Aug. 3, 2017, 9:24 a.m. UTC | #1
Hi,

The patch looks correct.

On 07/16/2017 09:39 AM, Bjorn Andersson wrote:
> 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 <bjorn.andersson@linaro.org>
> ---
>  drivers/pci/dwc/pcie-qcom.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>

> 
> 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)
>
diff mbox

Patch

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)