[net-next,1/3] ezchip: Remove some redundant clean-up functions
Commit Message
free_netdev() already calls netif_napi_del(), no need to call it
explicitly.
It's harmless, but useless.
Remove the call in the error handling path of the probe and in the remove
function.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/net/ethernet/ezchip/nps_enet.c | 2 --
1 file changed, 2 deletions(-)
Comments
On Wed, 4 Jan 2023 22:05:32 +0100 Christophe JAILLET wrote:
> @@ -640,7 +639,6 @@ static s32 nps_enet_remove(struct platform_device *pdev)
> struct nps_enet_priv *priv = netdev_priv(ndev);
>
> unregister_netdev(ndev);
> - netif_napi_del(&priv->napi);
> free_netdev(ndev);
This adds an unused variable warning, which is fixed by the next patch.
Could you remove the @priv variable here already?
@@ -627,7 +627,6 @@ static s32 nps_enet_probe(struct platform_device *pdev)
return 0;
out_netif_api:
- netif_napi_del(&priv->napi);
out_netdev:
free_netdev(ndev);
@@ -640,7 +639,6 @@ static s32 nps_enet_remove(struct platform_device *pdev)
struct nps_enet_priv *priv = netdev_priv(ndev);
unregister_netdev(ndev);
- netif_napi_del(&priv->napi);
free_netdev(ndev);
return 0;