aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-12-13 00:01:02 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-12-13 00:01:02 -0500
commitff7eba15ae65e4299fd9e0fbf067477ce6b43d91 (patch)
tree67158d972ead1868cee25f8f3864dfd6b532cc9f /drivers/net
parentfed954dafc0ab03e00501862df397e8f8e2211fd (diff)
parent3c92cae74b24bdd521ad67eff260a8e4ce540d2b (diff)
Merge branch 'e1000'
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/e1000/e1000_ethtool.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 8eae8ba27e84..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
@@ -1440,9 +1448,11 @@ static int
1440e1000_loopback_test(struct e1000_adapter *adapter, uint64_t *data) 1448e1000_loopback_test(struct e1000_adapter *adapter, uint64_t *data)
1441{ 1449{
1442 if((*data = e1000_setup_desc_rings(adapter))) goto err_loopback; 1450 if((*data = e1000_setup_desc_rings(adapter))) goto err_loopback;
1443 if((*data = e1000_setup_loopback_test(adapter))) goto err_loopback; 1451 if((*data = e1000_setup_loopback_test(adapter)))
1452 goto err_loopback_setup;
1444 *data = e1000_run_loopback_test(adapter); 1453 *data = e1000_run_loopback_test(adapter);
1445 e1000_loopback_cleanup(adapter); 1454 e1000_loopback_cleanup(adapter);
1455err_loopback_setup:
1446 e1000_free_desc_rings(adapter); 1456 e1000_free_desc_rings(adapter);
1447err_loopback: 1457err_loopback:
1448 return *data; 1458 return *data;