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:

zatwierdzone przez
David S. Miller

rodzic
5477fccf9a
commit
399e06a517
@@ -247,8 +247,7 @@ static void meth_free_tx_ring(struct meth_private *priv)
|
||||
|
||||
/* Remove any pending skb */
|
||||
for (i = 0; i < TX_RING_ENTRIES; i++) {
|
||||
if (priv->tx_skbs[i])
|
||||
dev_kfree_skb(priv->tx_skbs[i]);
|
||||
dev_kfree_skb(priv->tx_skbs[i]);
|
||||
priv->tx_skbs[i] = NULL;
|
||||
}
|
||||
dma_free_coherent(&priv->pdev->dev, TX_RING_BUFFER_SIZE, priv->tx_ring,
|
||||
|
Reference in New Issue
Block a user