summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Schenker <philippe.schenker@toradex.com>2020-10-16 16:48:50 +0200
committerOleksandr Suvorov <oleksandr.suvorov@toradex.com>2021-01-28 14:48:11 +0200
commitbe64a11d7e5773a4742bb82b443ae8192eb8f283 (patch)
treee42eac5ebc19a23db18dedddd3eaaba738fd3b0b
parent8879894c4dad19e95770dc479b359fd641826198 (diff)
pci-imx6: fix goto-error-handling to also disable regulator
remove disabling regulator from imx6_pcie_establish_link function to prevent unbalanced regulator disabling. Related-to: ELB-3156 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
-rw-r--r--drivers/pci/controller/dwc/pci-imx6.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index d8f88a3a09a6..de02d08c23ad 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -1943,8 +1943,6 @@ err_reset_phy:
imx6_pcie_clk_disable(imx6_pcie);
if (imx6_pcie->vpcie != NULL)
regulator_disable(imx6_pcie->vpcie);
- if (imx6_pcie->epdev_on != NULL)
- regulator_disable(imx6_pcie->epdev_on);
}
return ret;
@@ -2782,7 +2780,7 @@ static int imx6_pcie_probe(struct platform_device *pdev)
} else {
dev_err(dev, "unable to add pcie port.\n");
}
- goto err_ret;
+ goto err_reg;
}
pci_imx_set_msi_en(&imx6_pcie->pci->pp);
@@ -2840,6 +2838,8 @@ static int imx6_pcie_probe(struct platform_device *pdev)
return 0;
+err_reg:
+ regulator_disable(imx6_pcie->epdev_on);
err_ret:
imx6_pcie_detach_pd(dev);
return ret;