aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index 10bdf52353..b8cc2c8f4c 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -1975,10 +1975,6 @@ ar8xxx_probe_switch(struct ar8xxx_priv *priv)
struct switch_dev *swdev;
int ret;
- ret = ar8xxx_id_chip(priv);
- if (ret)
- return ret;
-
chip = priv->chip;
swdev = &priv->dev;
@@ -2208,6 +2204,10 @@ ar8xxx_phy_probe(struct phy_device *phydev)
priv->mii_bus = phydev->mdio.bus;
priv->pdev = &phydev->mdio.dev;
+ ret = ar8xxx_id_chip(priv);
+ if (ret)
+ goto free_priv;
+
ret = ar8xxx_probe_switch(priv);
if (ret)
goto free_priv;