Commit 3f38c683 authored by Fugang Duan's avatar Fugang Duan Committed by David S. Miller

net: fec: defer probe if regulator is not ready

Defer probe if regulator is not ready. E.g. some regulator is fixed
regulator controlled by i2c expander gpio, the i2c device may be probed
after the driver, then it should handle the case of defer probe error.
Signed-off-by: default avatarFugang Duan <fugang.duan@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e90f686b
...@@ -3469,6 +3469,10 @@ fec_probe(struct platform_device *pdev) ...@@ -3469,6 +3469,10 @@ fec_probe(struct platform_device *pdev)
goto failed_regulator; goto failed_regulator;
} }
} else { } else {
if (PTR_ERR(fep->reg_phy) == -EPROBE_DEFER) {
ret = -EPROBE_DEFER;
goto failed_regulator;
}
fep->reg_phy = NULL; fep->reg_phy = NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment