Skip to content

Commit

Permalink
Merge branch 'fec-clean-up-in-the-cases-of-probe-error'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Jan 3, 2018
2 parents f1c8d37 + 3f38c68 commit 5f0850e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/ethernet/freescale/fec_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -3556,6 +3560,7 @@ fec_probe(struct platform_device *pdev)
of_node_put(phy_node);
failed_ioremap:
free_netdev(ndev);
dev_id--;

return ret;
}
Expand Down

0 comments on commit 5f0850e

Please sign in to comment.