|
|
@@ -3339,13 +3339,6 @@ int stmmac_dvr_probe(struct device *device,
|
|
|
|
|
|
spin_lock_init(&priv->lock);
|
|
|
|
|
|
- ret = register_netdev(ndev);
|
|
|
- if (ret) {
|
|
|
- netdev_err(priv->dev, "%s: ERROR %i registering the device\n",
|
|
|
- __func__, ret);
|
|
|
- goto error_netdev_register;
|
|
|
- }
|
|
|
-
|
|
|
/* If a specific clk_csr value is passed from the platform
|
|
|
* this means that the CSR Clock Range selection cannot be
|
|
|
* changed at run-time and it is fixed. Viceversa the driver'll try to
|
|
|
@@ -3372,11 +3365,14 @@ int stmmac_dvr_probe(struct device *device,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- return 0;
|
|
|
+ ret = register_netdev(ndev);
|
|
|
+ if (ret)
|
|
|
+ netdev_err(priv->dev, "%s: ERROR %i registering the device\n",
|
|
|
+ __func__, ret);
|
|
|
+
|
|
|
+ return ret;
|
|
|
|
|
|
error_mdio_register:
|
|
|
- unregister_netdev(ndev);
|
|
|
-error_netdev_register:
|
|
|
netif_napi_del(&priv->napi);
|
|
|
error_hw_init:
|
|
|
clk_disable_unprepare(priv->pclk);
|