aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c
index 8a088bd5ce..cf6d4806ed 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c
@@ -1376,11 +1376,16 @@ static int __init fe_init(struct net_device *dev)
else
fe_reset_fe(priv);
- if (priv->soc->switch_init)
- if (priv->soc->switch_init(priv)) {
+ if (priv->soc->switch_init) {
+ err = priv->soc->switch_init(priv);
+ if (err) {
+ if (err == -EPROBE_DEFER)
+ return err;
+
netdev_err(dev, "failed to initialize switch core\n");
return -ENODEV;
}
+ }
fe_reset_phy(priv);