aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb/ixgb_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgb/ixgb_main.c')
-rw-r--r--drivers/net/ixgb/ixgb_main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index aa75385cd6c7..be3c7dc96f63 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -977,15 +977,17 @@ ixgb_clean_rx_ring(struct ixgb_adapter *adapter)
977 977
978 for (i = 0; i < rx_ring->count; i++) { 978 for (i = 0; i < rx_ring->count; i++) {
979 buffer_info = &rx_ring->buffer_info[i]; 979 buffer_info = &rx_ring->buffer_info[i];
980 if (buffer_info->skb) { 980 if (buffer_info->dma) {
981
982 pci_unmap_single(pdev, 981 pci_unmap_single(pdev,
983 buffer_info->dma, 982 buffer_info->dma,
984 buffer_info->length, 983 buffer_info->length,
985 PCI_DMA_FROMDEVICE); 984 PCI_DMA_FROMDEVICE);
985 buffer_info->dma = 0;
986 buffer_info->length = 0;
987 }
986 988
989 if (buffer_info->skb) {
987 dev_kfree_skb(buffer_info->skb); 990 dev_kfree_skb(buffer_info->skb);
988
989 buffer_info->skb = NULL; 991 buffer_info->skb = NULL;
990 } 992 }
991 } 993 }