summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/amd/ni65.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2019-08-22 21:02:56 +0300
committerDavid S. Miller <davem@davemloft.net>2019-08-23 02:22:04 +0300
commit399e06a517b6f1da5f617d413f6e5489f5054f7a (patch)
tree6d406a7734d005746d300bd75f332dae2c961b01 /drivers/net/ethernet/amd/ni65.c
parent5477fccf9abd7342a987d401fa50c0d93ebd09b9 (diff)
downloadlinux-399e06a517b6f1da5f617d413f6e5489f5054f7a.tar.xz
ethernet: Delete unnecessary checks before the macro call “dev_kfree_skb”
The dev_kfree_skb() function performs also input parameter validation. Thus the test around the shown calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/ni65.c')
-rw-r--r--drivers/net/ethernet/amd/ni65.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/amd/ni65.c b/drivers/net/ethernet/amd/ni65.c
index 87ff5d6d1b22..c6c2a54c1121 100644
--- a/drivers/net/ethernet/amd/ni65.c
+++ b/drivers/net/ethernet/amd/ni65.c
@@ -697,16 +697,14 @@ static void ni65_free_buffer(struct priv *p)
for(i=0;i<TMDNUM;i++) {
kfree(p->tmdbounce[i]);
#ifdef XMT_VIA_SKB
- if(p->tmd_skb[i])
- dev_kfree_skb(p->tmd_skb[i]);
+ dev_kfree_skb(p->tmd_skb[i]);
#endif
}
for(i=0;i<RMDNUM;i++)
{
#ifdef RCV_VIA_SKB
- if(p->recv_skb[i])
- dev_kfree_skb(p->recv_skb[i]);
+ dev_kfree_skb(p->recv_skb[i]);
#else
kfree(p->recvbounce[i]);
#endif