diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/e1000/e1000_ethtool.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index 8584e9382c2c..8646914964e7 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
@@ -960,13 +960,21 @@ e1000_free_desc_rings(struct e1000_adapter *adapter) | |||
960 | } | 960 | } |
961 | } | 961 | } |
962 | 962 | ||
963 | if(txdr->desc) | 963 | if(txdr->desc) { |
964 | pci_free_consistent(pdev, txdr->size, txdr->desc, txdr->dma); | 964 | pci_free_consistent(pdev, txdr->size, txdr->desc, txdr->dma); |
965 | if(rxdr->desc) | 965 | txdr->desc = NULL; |
966 | } | ||
967 | if(rxdr->desc) { | ||
966 | pci_free_consistent(pdev, rxdr->size, rxdr->desc, rxdr->dma); | 968 | pci_free_consistent(pdev, rxdr->size, rxdr->desc, rxdr->dma); |
969 | rxdr->desc = NULL; | ||
970 | } | ||
967 | 971 | ||
968 | kfree(txdr->buffer_info); | 972 | kfree(txdr->buffer_info); |
973 | txdr->buffer_info = NULL; | ||
974 | |||
969 | kfree(rxdr->buffer_info); | 975 | kfree(rxdr->buffer_info); |
976 | rxdr->buffer_info = NULL; | ||
977 | |||
970 | return; | 978 | return; |
971 | } | 979 | } |
972 | 980 | ||