Skip to content

Commit

Permalink
s390/ctcm: Delete unnecessary checks before the macro call “dev_kfree…
Browse files Browse the repository at this point in the history
…_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: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Markus Elfring authored and David S. Miller committed Sep 16, 2019
1 parent f432c2e commit 56a4e37
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/s390/net/ctcm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1072,10 +1072,8 @@ static void ctcm_free_netdevice(struct net_device *dev)
if (grp) {
if (grp->fsm)
kfree_fsm(grp->fsm);
if (grp->xid_skb)
dev_kfree_skb(grp->xid_skb);
if (grp->rcvd_xid_skb)
dev_kfree_skb(grp->rcvd_xid_skb);
dev_kfree_skb(grp->xid_skb);
dev_kfree_skb(grp->rcvd_xid_skb);
tasklet_kill(&grp->mpc_tasklet2);
kfree(grp);
priv->mpcg = NULL;
Expand Down

0 comments on commit 56a4e37

Please sign in to comment.