diff options
author | Joe Perches <joe@perches.com> | 2012-01-29 12:56:23 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-31 16:20:21 -0500 |
commit | e404decb0fb017be80552adee894b35307b6c7b4 (patch) | |
tree | 19b2324328eb1f8cef599f9f164dc9ca6e5699c9 /drivers/net/vmxnet3 | |
parent | 5f3d9cb2962967d9d7e03abb4a7ca275a9a3fea5 (diff) |
drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages
alloc failures use dump_stack so emitting an additional
out-of-memory message is an unnecessary duplication.
Remove the allocation failure messages.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_drv.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index be6aa353f6a1..87c0b586f11f 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -537,11 +537,8 @@ vmxnet3_tq_create(struct vmxnet3_tx_queue *tq, tq->buf_info = kcalloc(tq->tx_ring.size, sizeof(tq->buf_info[0]), GFP_KERNEL); - if (!tq->buf_info) { - printk(KERN_ERR "%s: failed to allocate tx bufinfo\n", - adapter->netdev->name); + if (!tq->buf_info) goto err; - } return 0; @@ -1519,11 +1516,9 @@ vmxnet3_rq_create(struct vmxnet3_rx_queue *rq, struct vmxnet3_adapter *adapter) sz = sizeof(struct vmxnet3_rx_buf_info) * (rq->rx_ring[0].size + rq->rx_ring[1].size); bi = kzalloc(sz, GFP_KERNEL); - if (!bi) { - printk(KERN_ERR "%s: failed to allocate rx bufinfo\n", - adapter->netdev->name); + if (!bi) goto err; - } + rq->buf_info[0] = bi; rq->buf_info[1] = bi + rq->rx_ring[0].size; @@ -2964,8 +2959,6 @@ vmxnet3_probe_device(struct pci_dev *pdev, adapter->pm_conf = kmalloc(sizeof(struct Vmxnet3_PMConf), GFP_KERNEL); if (adapter->pm_conf == NULL) { - printk(KERN_ERR "Failed to allocate memory for %s\n", - pci_name(pdev)); err = -ENOMEM; goto err_alloc_pm; } @@ -2974,8 +2967,6 @@ vmxnet3_probe_device(struct pci_dev *pdev, adapter->rss_conf = kmalloc(sizeof(struct UPT1_RSSConf), GFP_KERNEL); if (adapter->rss_conf == NULL) { - printk(KERN_ERR "Failed to allocate memory for %s\n", - pci_name(pdev)); err = -ENOMEM; goto err_alloc_rss; } |