diff options
author | David S. Miller <davem@davemloft.net> | 2018-01-03 17:40:42 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-03 17:40:42 +0100 |
commit | 5f0850e145434c2af1fbfb29bc23ba6ea8d1423e (patch) | |
tree | f106abde0edeb35d4805ed72262e42158e0aae6e | |
parent | vxlan: trivial indenting fix. (diff) | |
parent | net: fec: defer probe if regulator is not ready (diff) | |
download | linux-5f0850e145434c2af1fbfb29bc23ba6ea8d1423e.tar.xz linux-5f0850e145434c2af1fbfb29bc23ba6ea8d1423e.zip |
Merge branch 'fec-clean-up-in-the-cases-of-probe-error'
Fugang Duan says:
====================
net: fec: clean up in the cases of probe error
The simple patches just clean up in the cases of probe error like restore dev_id and
handle the defer probe when regulator is still not ready.
v2:
* Fabio Estevam's comment to suggest split v1 to separate patches.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 8184d2fca9be..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; } @@ -3556,6 +3560,7 @@ failed_phy: of_node_put(phy_node); failed_ioremap: free_netdev(ndev); + dev_id--; return ret; } |