History

net: hisilicon: hix5hd2_gmac: remove redundant NAPI delete

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.

Jiawen Liu committed 3 months ago

Commit f307a7d1 parent 47d7f701 file · +0 −1Browse files

Unified · Split

drivers/net/ethernet/hisilicon/hix5hd2_gmac.c+0−1
@@ -1282,7 +1282,6 @@ static void hix5hd2_dev_remove(struct platform_device *pdev) · 1281 unmodified lines
12821282 struct net_device *ndev = platform_get_drvdata(pdev);
12831283 struct hix5hd2_priv *priv = netdev_priv(ndev);
12841284
1285− netif_napi_del(&priv->napi);
12861285 unregister_netdev(ndev);
12871286 mdiobus_unregister(priv->bus);
12881287 mdiobus_free(priv->bus);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t