Skip to content

Commit

Permalink
sundance: Use dev_kfree_skb_any() helper
Browse files Browse the repository at this point in the history
Use dev_kfree_skb_any() helper to free the skb

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Denis Kirjanov authored and David S. Miller committed Sep 22, 2010
1 parent d91dc27 commit a9478e3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/net/sundance.c
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,6 @@ reset_tx (struct net_device *dev)
void __iomem *ioaddr = np->base;
struct sk_buff *skb;
int i;
int irq = in_interrupt();

/* Reset tx logic, TxListPtr will be cleaned */
iowrite16 (TxDisable, ioaddr + MACCtrl1);
Expand All @@ -1131,10 +1130,7 @@ reset_tx (struct net_device *dev)
dma_unmap_single(&np->pci_dev->dev,
le32_to_cpu(np->tx_ring[i].frag[0].addr),
skb->len, DMA_TO_DEVICE);
if (irq)
dev_kfree_skb_irq (skb);
else
dev_kfree_skb (skb);
dev_kfree_skb_any(skb);
np->tx_skbuff[i] = NULL;
dev->stats.tx_dropped++;
}
Expand Down

0 comments on commit a9478e3

Please sign in to comment.