@@ -475,8 +475,6 @@ static void free_gfar_dev(struct gfar_private *priv)
kfree(priv->gfargrp[i].irqinfo[j]);
priv->gfargrp[i].irqinfo[j] = NULL;
}
-
- free_netdev(priv->ndev);
}
static void disable_napi(struct gfar_private *priv)
@@ -681,7 +679,8 @@ static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev)
return -EINVAL;
}
- *pdev = alloc_etherdev_mq(sizeof(*priv), num_tx_qs);
+ *pdev = devm_alloc_etherdev_mqs(&ofdev->dev, sizeof(*priv), num_tx_qs,
+ num_rx_qs);
dev = *pdev;
if (NULL == dev)
return -ENOMEM;