|
@@ -2801,12 +2801,11 @@ static int stmmac_hw_init(struct stmmac_priv *priv)
|
|
|
* Description: this is the main probe function used to
|
|
|
* call the alloc_etherdev, allocate the priv structure.
|
|
|
* Return:
|
|
|
- * on success the new private structure is returned, otherwise the error
|
|
|
- * pointer.
|
|
|
+ * returns 0 on success, otherwise errno.
|
|
|
*/
|
|
|
-struct stmmac_priv *stmmac_dvr_probe(struct device *device,
|
|
|
- struct plat_stmmacenet_data *plat_dat,
|
|
|
- struct stmmac_resources *res)
|
|
|
+int stmmac_dvr_probe(struct device *device,
|
|
|
+ struct plat_stmmacenet_data *plat_dat,
|
|
|
+ struct stmmac_resources *res)
|
|
|
{
|
|
|
int ret = 0;
|
|
|
struct net_device *ndev = NULL;
|
|
@@ -2814,7 +2813,7 @@ struct stmmac_priv *stmmac_dvr_probe(struct device *device,
|
|
|
|
|
|
ndev = alloc_etherdev(sizeof(struct stmmac_priv));
|
|
|
if (!ndev)
|
|
|
- return ERR_PTR(-ENOMEM);
|
|
|
+ return -ENOMEM;
|
|
|
|
|
|
SET_NETDEV_DEV(ndev, device);
|
|
|
|
|
@@ -2950,7 +2949,7 @@ struct stmmac_priv *stmmac_dvr_probe(struct device *device,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- return priv;
|
|
|
+ return 0;
|
|
|
|
|
|
error_mdio_register:
|
|
|
unregister_netdev(ndev);
|
|
@@ -2963,7 +2962,7 @@ error_pclk_get:
|
|
|
error_clk_get:
|
|
|
free_netdev(ndev);
|
|
|
|
|
|
- return ERR_PTR(ret);
|
|
|
+ return ret;
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(stmmac_dvr_probe);
|
|
|
|