return ret;
        }
 
-       /* Some bootloaders leave the fiber page selected.
-        * Switch to the copper page, as otherwise we read
-        * the PHY capabilities from the fiber side.
-        */
-       if (phydev->drv->phy_id == ATH8031_PHY_ID) {
-               phy_lock_mdio_bus(phydev);
-               ret = at803x_write_page(phydev, AT803X_PAGE_COPPER);
-               phy_unlock_mdio_bus(phydev);
-               if (ret)
-                       goto err;
-       }
-
        return 0;
-
-err:
-       if (priv->vddio)
-               regulator_disable(priv->vddio);
-
-       return ret;
 }
 
 static void at803x_remove(struct phy_device *phydev)
 {
        int ret;
 
+       if (phydev->drv->phy_id == ATH8031_PHY_ID) {
+               /* Some bootloaders leave the fiber page selected.
+                * Switch to the copper page, as otherwise we read
+                * the PHY capabilities from the fiber side.
+                */
+               phy_lock_mdio_bus(phydev);
+               ret = at803x_write_page(phydev, AT803X_PAGE_COPPER);
+               phy_unlock_mdio_bus(phydev);
+               if (ret)
+                       return ret;
+
+               ret = at8031_pll_config(phydev);
+               if (ret < 0)
+                       return ret;
+       }
+
        /* The RX and TX delay default is:
         *   after HW reset: RX delay enabled and TX delay disabled
         *   after SW reset: RX delay enabled, while TX delay retains the
        if (ret < 0)
                return ret;
 
-       if (phydev->drv->phy_id == ATH8031_PHY_ID) {
-               ret = at8031_pll_config(phydev);
-               if (ret < 0)
-                       return ret;
-       }
-
        /* Ar803x extended next page bit is enabled by default. Cisco
         * multigig switches read this bit and attempt to negotiate 10Gbps
         * rates even if the next page bit is disabled. This is incorrect