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>
This commit is contained in:

committed by
David S. Miller

parent
5477fccf9a
commit
399e06a517
@@ -378,8 +378,7 @@ static void smc_shutdown(struct net_device *dev)
|
||||
pending_skb = lp->pending_tx_skb;
|
||||
lp->pending_tx_skb = NULL;
|
||||
spin_unlock_irq(&lp->lock);
|
||||
if (pending_skb)
|
||||
dev_kfree_skb(pending_skb);
|
||||
dev_kfree_skb(pending_skb);
|
||||
|
||||
/* and tell the card to stay away from that nasty outside world */
|
||||
SMC_SELECT_BANK(lp, 0);
|
||||
|
Reference in New Issue
Block a user