aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/tundra
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-03-14 09:07:21 -0400
committerDavid S. Miller <davem@davemloft.net>2013-03-15 08:56:58 -0400
commitd0320f750093d012d3ed69fc1e8b385f654523d5 (patch)
tree1f9c25c892c33275fb85a993e9a274dc5618370b /drivers/net/ethernet/tundra
parent68c45a2da34cb44962c6a48f8e474ec6b7853641 (diff)
drivers:net: Remove dma_alloc_coherent OOM messages
I believe these error messages are already logged on allocation failure by warn_alloc_failed and so get a dump_stack on OOM. Remove the unnecessary additional error logging. Around these deletions: o Alignment neatening. o Remove unnecessary casts of dma_alloc_coherent. o Hoist assigns from ifs. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/tundra')
-rw-r--r--drivers/net/ethernet/tundra/tsi108_eth.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/ethernet/tundra/tsi108_eth.c b/drivers/net/ethernet/tundra/tsi108_eth.c
index 8fa947a2d929..99fe3c6eea31 100644
--- a/drivers/net/ethernet/tundra/tsi108_eth.c
+++ b/drivers/net/ethernet/tundra/tsi108_eth.c
@@ -1309,22 +1309,16 @@ static int tsi108_open(struct net_device *dev)
1309 } 1309 }
1310 1310
1311 data->rxring = dma_alloc_coherent(NULL, rxring_size, 1311 data->rxring = dma_alloc_coherent(NULL, rxring_size,
1312 &data->rxdma, GFP_KERNEL); 1312 &data->rxdma, GFP_KERNEL);
1313
1314 if (!data->rxring) { 1313 if (!data->rxring) {
1315 printk(KERN_DEBUG
1316 "TSI108_ETH: failed to allocate memory for rxring!\n");
1317 return -ENOMEM; 1314 return -ENOMEM;
1318 } else { 1315 } else {
1319 memset(data->rxring, 0, rxring_size); 1316 memset(data->rxring, 0, rxring_size);
1320 } 1317 }
1321 1318
1322 data->txring = dma_alloc_coherent(NULL, txring_size, 1319 data->txring = dma_alloc_coherent(NULL, txring_size,
1323 &data->txdma, GFP_KERNEL); 1320 &data->txdma, GFP_KERNEL);
1324
1325 if (!data->txring) { 1321 if (!data->txring) {
1326 printk(KERN_DEBUG
1327 "TSI108_ETH: failed to allocate memory for txring!\n");
1328 pci_free_consistent(0, rxring_size, data->rxring, data->rxdma); 1322 pci_free_consistent(0, rxring_size, data->rxring, data->rxdma);
1329 return -ENOMEM; 1323 return -ENOMEM;
1330 } else { 1324 } else {