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:
Markus Elfring
2019-08-22 20:02:56 +02:00
committed by David S. Miller
parent 5477fccf9a
commit 399e06a517
20 changed files with 27 additions and 57 deletions

View File

@@ -1532,8 +1532,7 @@ out_dropped:
else if (port)
del_timer(&port->clean_timer);
rcu_read_unlock();
if (skb)
dev_kfree_skb(skb);
dev_kfree_skb(skb);
vnet_free_skbs(freeskbs);
dev->stats.tx_dropped++;
return NETDEV_TX_OK;