MLK-23888 cpufreq: imx7ulp: Fix cpufreq probe failure due to defer probe
It is possible that the regulator_get will return defer probe error if the regulator is not ready when cpufreq doing probe. cpufreq need to defer probe again if regulator_get return '-EPROBE_DEFER', so fix it. Signed-off-by: Jacky Bai <ping.bai@nxp.com> Reviewed-by: Anson Huang <anson.huang@nxp.com>5.4-rM2-2.2.x-imx-squashed
parent
f51e2308f2
commit
52aa8b0564
|
@ -170,9 +170,10 @@ static int imx7ulp_cpufreq_probe(struct platform_device *pdev)
|
|||
|
||||
arm_reg = regulator_get(cpu_dev, "arm");
|
||||
if (IS_ERR(arm_reg)) {
|
||||
dev_err(cpu_dev, "failed to get regulator\n");
|
||||
ret = -ENOENT;
|
||||
goto put_reg;
|
||||
if (PTR_ERR(arm_reg) != -EPROBE_DEFER)
|
||||
dev_err(cpu_dev, "failed to get regulator\n");
|
||||
ret = PTR_ERR(arm_reg);
|
||||
goto put_clk;
|
||||
}
|
||||
|
||||
ret = dev_pm_opp_of_add_table(cpu_dev);
|
||||
|
|
Loading…
Reference in New Issue