hix5hd2_dev_remove() calls netif_napi_del() before unregister_netdev(). This is not needed because free_netdev() deletes all NAPI instances attached to the net_device. Remove the redundant call and let the networking core tear down the NAPI instance during unregister_netdev(). The probe error path still keeps its explicit netif_napi_del(), because the device has not been registered there.
Unified · Split
| @@ -1282,7 +1282,6 @@ static void hix5hd2_dev_remove(struct platform_device *pdev) · 1281 unmodified lines | |||
| 1282 | struct net_device *ndev = platform_get_drvdata(pdev); | 1282 | struct net_device *ndev = platform_get_drvdata(pdev); |
| 1283 | struct hix5hd2_priv *priv = netdev_priv(ndev); | 1283 | struct hix5hd2_priv *priv = netdev_priv(ndev); |
| 1284 | 1284 | ||
| 1285 | netif_napi_del(&priv->napi); | ||
| 1286 | unregister_netdev(ndev); | 1285 | unregister_netdev(ndev); |
| 1287 | mdiobus_unregister(priv->bus); | 1286 | mdiobus_unregister(priv->bus); |
| 1288 | mdiobus_free(priv->bus); | 1287 | mdiobus_free(priv->bus); |