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: Fugang Duan <fugang.duan@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e90f686b43
commit
3f38c68303
|
@ -3469,6 +3469,10 @@ fec_probe(struct platform_device *pdev)
|
|||
goto failed_regulator;
|
||||
}
|
||||
} else {
|
||||
if (PTR_ERR(fep->reg_phy) == -EPROBE_DEFER) {
|
||||
ret = -EPROBE_DEFER;
|
||||
goto failed_regulator;
|
||||
}
|
||||
fep->reg_phy = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue