PCI: qcom: Don't unroll init if ->init() fails
authorBjorn Andersson <bjorn.andersson@linaro.org>
Sun, 16 Jul 2017 06:41:53 +0000 (23:41 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 3 Aug 2017 21:55:43 +0000 (16:55 -0500)
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>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>
drivers/pci/dwc/pcie-qcom.c

index d15657dc3990cf835d37a88f6393bdd133408e84..7b703741a3fd043dab0af2b8e3024acce063a868 100644 (file)
@@ -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)