Return the error when the pll is not locked.
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
dev_err(dev, "ERROR PM_REQ_CORE_RST is still set.\n");
/* wait for phy pll lock firstly. */
- if (pci_imx_phy_pll_locked(imx6_pcie))
+ if (pci_imx_phy_pll_locked(imx6_pcie)) {
ret = -ENODEV;
+ break;
+ }
/* set up the cpu address offset */
if (imx6_pcie->cpu_base)
mdelay(20);
}
- return ret;
+ if (ret == 0)
+ return ret;
err_ref_clk:
clk_disable_unprepare(imx6_pcie->pcie_phy);