diff options
author | Fugang Duan | 2018-01-03 10:39:30 +0800 |
---|---|---|
committer | David S. Miller | 2018-01-03 11:40:41 -0500 |
commit | 3f38c683033a9a0a2738e7067f449deefabfa3ef (patch) | |
tree | f106abde0edeb35d4805ed72262e42158e0aae6e /drivers/net | |
parent | e90f686b4358d7d7e5dbaa48b8e78c9a4e41826e (diff) |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 6a4fc2b35488..19f198e22e15 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -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; } |