summaryrefslogtreecommitdiff
path: root/drivers/pci/host/pci-imx6.c
diff options
context:
space:
mode:
authorRichard Zhu <hongxing.zhu@nxp.com>2017-08-15 17:18:17 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commitfde0ff8c5f3db031346747e18f66283641e1fd29 (patch)
treec4a22fc03424abac2e09210d512f7c5074a8bdcf /drivers/pci/host/pci-imx6.c
parent23717e8558e2eff578db25784dd5e2055ff802cf (diff)
MLK-16176-2 PCI: imx: get the bus clock regulator correctly
In order to make sure that get the regulator correctly. Check the return value of devm_regulator_get(). Return value directly if it is '-EPROBE_DEFER' Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Diffstat (limited to 'drivers/pci/host/pci-imx6.c')
-rw-r--r--drivers/pci/host/pci-imx6.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
index a4b3706a0d61..0d24dc4b6da5 100644
--- a/drivers/pci/host/pci-imx6.c
+++ b/drivers/pci/host/pci-imx6.c
@@ -1865,6 +1865,8 @@ static int imx6_pcie_probe(struct platform_device *pdev)
if (imx6_pcie->variant == IMX6QP) {
imx6_pcie->pcie_bus_regulator = devm_regulator_get(pp->dev,
"pcie-bus");
+ if (PTR_ERR(imx6_pcie->pcie_bus_regulator) == -EPROBE_DEFER)
+ return -EPROBE_DEFER;
if (IS_ERR(imx6_pcie->pcie_bus_regulator))
imx6_pcie->pcie_bus_regulator = NULL;
} else {