diff options
| author | Joe Perches <joe@perches.com> | 2012-01-29 07:56:23 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2012-01-31 16:20:21 -0500 |
| commit | e404decb0fb017be80552adee894b35307b6c7b4 (patch) | |
| tree | 19b2324328eb1f8cef599f9f164dc9ca6e5699c9 /drivers | |
| 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')
60 files changed, 77 insertions, 233 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index f820b26b9db3..9abfde479316 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c | |||
| @@ -180,11 +180,9 @@ static int tlb_initialize(struct bonding *bond) | |||
| 180 | int i; | 180 | int i; |
| 181 | 181 | ||
| 182 | new_hashtbl = kzalloc(size, GFP_KERNEL); | 182 | new_hashtbl = kzalloc(size, GFP_KERNEL); |
| 183 | if (!new_hashtbl) { | 183 | if (!new_hashtbl) |
| 184 | pr_err("%s: Error: Failed to allocate TLB hash table\n", | ||
| 185 | bond->dev->name); | ||
| 186 | return -1; | 184 | return -1; |
| 187 | } | 185 | |
| 188 | _lock_tx_hashtbl_bh(bond); | 186 | _lock_tx_hashtbl_bh(bond); |
| 189 | 187 | ||
| 190 | bond_info->tx_hashtbl = new_hashtbl; | 188 | bond_info->tx_hashtbl = new_hashtbl; |
| @@ -784,11 +782,9 @@ static int rlb_initialize(struct bonding *bond) | |||
| 784 | int i; | 782 | int i; |
| 785 | 783 | ||
| 786 | new_hashtbl = kmalloc(size, GFP_KERNEL); | 784 | new_hashtbl = kmalloc(size, GFP_KERNEL); |
| 787 | if (!new_hashtbl) { | 785 | if (!new_hashtbl) |
| 788 | pr_err("%s: Error: Failed to allocate RLB hash table\n", | ||
| 789 | bond->dev->name); | ||
| 790 | return -1; | 786 | return -1; |
| 791 | } | 787 | |
| 792 | _lock_rx_hashtbl_bh(bond); | 788 | _lock_rx_hashtbl_bh(bond); |
| 793 | 789 | ||
| 794 | bond_info->rx_hashtbl = new_hashtbl; | 790 | bond_info->rx_hashtbl = new_hashtbl; |
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c index 579e7fca6447..98a5a7d867f5 100644 --- a/drivers/net/can/slcan.c +++ b/drivers/net/can/slcan.c | |||
| @@ -639,10 +639,8 @@ static int __init slcan_init(void) | |||
| 639 | printk(KERN_INFO "slcan: %d dynamic interface channels.\n", maxdev); | 639 | printk(KERN_INFO "slcan: %d dynamic interface channels.\n", maxdev); |
| 640 | 640 | ||
| 641 | slcan_devs = kzalloc(sizeof(struct net_device *)*maxdev, GFP_KERNEL); | 641 | slcan_devs = kzalloc(sizeof(struct net_device *)*maxdev, GFP_KERNEL); |
| 642 | if (!slcan_devs) { | 642 | if (!slcan_devs) |
| 643 | printk(KERN_ERR "slcan: can't allocate slcan device array!\n"); | ||
| 644 | return -ENOMEM; | 643 | return -ENOMEM; |
| 645 | } | ||
| 646 | 644 | ||
| 647 | /* Fill in our line protocol discipline, and register it */ | 645 | /* Fill in our line protocol discipline, and register it */ |
| 648 | status = tty_register_ldisc(N_SLCAN, &slc_ldisc); | 646 | status = tty_register_ldisc(N_SLCAN, &slc_ldisc); |
diff --git a/drivers/net/ethernet/amd/ni65.c b/drivers/net/ethernet/amd/ni65.c index 6e6aa7213aab..735c213798b1 100644 --- a/drivers/net/ethernet/amd/ni65.c +++ b/drivers/net/ethernet/amd/ni65.c | |||
| @@ -621,10 +621,8 @@ static void *ni65_alloc_mem(struct net_device *dev,char *what,int size,int type) | |||
| 621 | } | 621 | } |
| 622 | else { | 622 | else { |
| 623 | ret = ptr = kmalloc(T_BUF_SIZE,GFP_KERNEL | GFP_DMA); | 623 | ret = ptr = kmalloc(T_BUF_SIZE,GFP_KERNEL | GFP_DMA); |
| 624 | if(!ret) { | 624 | if(!ret) |
| 625 | printk(KERN_WARNING "%s: unable to allocate %s memory.\n",dev->name,what); | ||
| 626 | return NULL; | 625 | return NULL; |
| 627 | } | ||
| 628 | } | 626 | } |
| 629 | if( (u32) virt_to_phys(ptr+size) > 0x1000000) { | 627 | if( (u32) virt_to_phys(ptr+size) > 0x1000000) { |
| 630 | printk(KERN_WARNING "%s: unable to allocate %s memory in lower 16MB!\n",dev->name,what); | 628 | printk(KERN_WARNING "%s: unable to allocate %s memory in lower 16MB!\n",dev->name,what); |
diff --git a/drivers/net/ethernet/apple/bmac.c b/drivers/net/ethernet/apple/bmac.c index d070b229dbf7..4108ac800cf0 100644 --- a/drivers/net/ethernet/apple/bmac.c +++ b/drivers/net/ethernet/apple/bmac.c | |||
| @@ -1660,10 +1660,8 @@ static int __init bmac_init(void) | |||
| 1660 | { | 1660 | { |
| 1661 | if (bmac_emergency_rxbuf == NULL) { | 1661 | if (bmac_emergency_rxbuf == NULL) { |
| 1662 | bmac_emergency_rxbuf = kmalloc(RX_BUFLEN, GFP_KERNEL); | 1662 | bmac_emergency_rxbuf = kmalloc(RX_BUFLEN, GFP_KERNEL); |
| 1663 | if (bmac_emergency_rxbuf == NULL) { | 1663 | if (bmac_emergency_rxbuf == NULL) |
| 1664 | printk(KERN_ERR "BMAC: can't allocate emergency RX buffer\n"); | ||
| 1665 | return -ENOMEM; | 1664 | return -ENOMEM; |
| 1666 | } | ||
| 1667 | } | 1665 | } |
| 1668 | 1666 | ||
| 1669 | return macio_register_driver(&bmac_driver); | 1667 | return macio_register_driver(&bmac_driver); |
diff --git a/drivers/net/ethernet/apple/mace.c b/drivers/net/ethernet/apple/mace.c index bec87bd9195c..45ba18ee3d6a 100644 --- a/drivers/net/ethernet/apple/mace.c +++ b/drivers/net/ethernet/apple/mace.c | |||
| @@ -136,10 +136,8 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i | |||
| 136 | */ | 136 | */ |
| 137 | if (dummy_buf == NULL) { | 137 | if (dummy_buf == NULL) { |
| 138 | dummy_buf = kmalloc(RX_BUFLEN+2, GFP_KERNEL); | 138 | dummy_buf = kmalloc(RX_BUFLEN+2, GFP_KERNEL); |
