summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/freescale
diff options
context:
space:
mode:
authorFugang Duan <fugang.duan@nxp.com>2018-01-03 10:39:30 +0800
committerDavid S. Miller <davem@davemloft.net>2018-01-03 11:40:41 -0500
commit3f38c683033a9a0a2738e7067f449deefabfa3ef (patch)
treef106abde0edeb35d4805ed72262e42158e0aae6e /drivers/net/ethernet/freescale
parente90f686b4358d7d7e5dbaa48b8e78c9a4e41826e (diff)
downloadlinux-3f38c683033a9a0a2738e7067f449deefabfa3ef.tar.bz2
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.c4
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;
}