summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorPavel Skripkin <paskripkin@gmail.com>2021-06-18 19:14:37 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-19 21:46:00 +0300
commit4ae85b23e1f052379f0316e42494e2f84f2a3e6f (patch)
tree416cf9c62f3d7cad9ef016409c6216b773cae123 /drivers/net
parente4b8700e07a86e8eab6916aa5c5ba99042c34089 (diff)
downloadlinux-4ae85b23e1f052379f0316e42494e2f84f2a3e6f.tar.xz
net: ethernet: ezchip: remove redundant check
err varibale will be set everytime, when code gets into this path. This check will just slowdown the execution and that's all. Fixes: 0dd077093636 ("NET: Add ezchip ethernet driver") Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/ezchip/nps_enet.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/ezchip/nps_enet.c b/drivers/net/ethernet/ezchip/nps_enet.c
index 20d2c2bb26e4..c562a1e83913 100644
--- a/drivers/net/ethernet/ezchip/nps_enet.c
+++ b/drivers/net/ethernet/ezchip/nps_enet.c
@@ -630,8 +630,7 @@ static s32 nps_enet_probe(struct platform_device *pdev)
out_netif_api:
netif_napi_del(&priv->napi);
out_netdev:
- if (err)
- free_netdev(ndev);
+ free_netdev(ndev);
return err;
}