aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-11-18 13:58:20 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-11-18 13:58:20 -0500
commite1d7a2de6c4249072dd886c129410e11e637ceff (patch)
tree14f3488490c4792007d4c9d678c9899c408b85f8 /drivers
parentfc71fe40d2bedcc57d3406bf2050481f8b3441b6 (diff)
parent6b27adb607282addcfe2707783dfcc28ba3a753b (diff)
Merge branch 'linville-e1000' of git://git.tuxdriver.com/git/netdev-jwl
Diffstat (limited to 'drivers')
-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;