diff options
author | 2018-01-03 10:39:30 +0800 | |
---|---|---|
committer | 2018-01-03 11:40:41 -0500 | |
commit | 3f38c683033a9a0a2738e7067f449deefabfa3ef (patch) | |
tree | f106abde0edeb35d4805ed72262e42158e0aae6e /drivers/net/ethernet/freescale | |
parent | net: fec: restore dev_id in the cases of probe error (diff) | |
download | linux-3f38c683033a9a0a2738e7067f449deefabfa3ef.tar.gz linux-3f38c683033a9a0a2738e7067f449deefabfa3ef.tar.bz2 linux-3f38c683033a9a0a2738e7067f449deefabfa3ef.zip |
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/ethernet/freescale')
-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; } |