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>
This commit is contained in:
Joe Perches
2012-01-29 12:56:23 +00:00
committed by David S. Miller
parent 5f3d9cb296
commit e404decb0f
60 changed files with 77 additions and 233 deletions

View File

@@ -730,10 +730,8 @@ static void e1000_dump_eeprom(struct e1000_adapter *adapter)
eeprom.offset = 0;
data = kmalloc(eeprom.len, GFP_KERNEL);
if (!data) {
pr_err("Unable to allocate memory to dump EEPROM data\n");
if (!data)
return;
}
ops->get_eeprom(netdev, &eeprom, data);

View File

@@ -1136,10 +1136,8 @@ ixgb_set_multi(struct net_device *netdev)
u8 *mta = kmalloc(IXGB_MAX_NUM_MULTICAST_ADDRESSES *
ETH_ALEN, GFP_ATOMIC);
u8 *addr;
if (!mta) {
pr_err("allocation of multicast memory failed\n");
if (!mta)
goto alloc_failed;
}
IXGB_WRITE_REG(hw, RCTL, rctl);

View File

@@ -2517,12 +2517,8 @@ int ixgbevf_setup_rx_resources(struct ixgbevf_adapter *adapter,
size = sizeof(struct ixgbevf_rx_buffer) * rx_ring->count;
rx_ring->rx_buffer_info = vzalloc(size);
if (!rx_ring->rx_buffer_info) {
hw_dbg(&adapter->hw,
"Unable to vmalloc buffer memory for "
"the receive descriptor ring\n");
if (!rx_ring->rx_buffer_info)
goto alloc_failed;
}
/* Round up to nearest 4K */
rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc);