diff options
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); |
139 | if (dummy_buf == NULL) { | 139 | if (dummy_buf == NULL) |
140 | printk(KERN_ERR "MACE: couldn't allocate dummy buffer\n"); | ||
141 | return -ENOMEM; | 140 | return -ENOMEM; |
142 | } | ||
143 | } | 141 | } |
144 | 142 | ||
145 | if (macio_request_resources(mdev, "mace")) { | 143 | if (macio_request_resources(mdev, "mace")) { |
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c index 021fb818007a..0a4c5405dcf4 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c | |||
@@ -2625,10 +2625,8 @@ bnx2_alloc_bad_rbuf(struct bnx2 *bp) | |||
2625 | u32 val; | 2625 | u32 val; |
2626 | 2626 | ||
2627 | good_mbuf = kmalloc(512 * sizeof(u16), GFP_KERNEL); | 2627 | good_mbuf = kmalloc(512 * sizeof(u16), GFP_KERNEL); |
2628 | if (good_mbuf == NULL) { | 2628 | if (good_mbuf == NULL) |
2629 | pr_err("Failed to allocate memory in %s\n", __func__); | ||
2630 | return -ENOMEM; | 2629 | return -ENOMEM; |
2631 | } | ||
2632 | 2630 | ||
2633 | REG_WR(bp, BNX2_MISC_ENABLE_SET_BITS, | 2631 | REG_WR(bp, BNX2_MISC_ENABLE_SET_BITS, |
2634 | BNX2_MISC_ENABLE_SET_BITS_RX_MBUF_ENABLE); | 2632 | BNX2_MISC_ENABLE_SET_BITS_RX_MBUF_ENABLE); |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index fea961505391..582cbcf5f9fb 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
@@ -10894,10 +10894,8 @@ static inline void be16_to_cpu_n(const u8 *_source, u8 *_target, u32 n) | |||
10894 | do { \ | 10894 | do { \ |
10895 | u32 len = be32_to_cpu(fw_hdr->arr.len); \ | 10895 | u32 len = be32_to_cpu(fw_hdr->arr.len); \ |
10896 | bp->arr = kmalloc(len, GFP_KERNEL); \ | 10896 | bp->arr = kmalloc(len, GFP_KERNEL); \ |
10897 | if (!bp->arr) { \ | 10897 | if (!bp->arr) \ |
10898 | pr_err("Failed to allocate %d bytes for "#arr"\n", len); \ | ||
10899 | goto lbl; \ | 10898 | goto lbl; \ |
10900 | } \ | ||
10901 | func(bp->firmware->data + be32_to_cpu(fw_hdr->arr.offset), \ | 10899 | func(bp->firmware->data + be32_to_cpu(fw_hdr->arr.offset), \ |
10902 | (u8 *)bp->arr, len); \ | 10900 | (u8 *)bp->arr, len); \ |
10903 | } while (0) | 10901 | } while (0) |
diff --git a/drivers/net/ethernet/brocade/bna/bnad_debugfs.c b/drivers/net/ethernet/brocade/bna/bnad_debugfs.c index 592ad3929f53..c9fdceb135f3 100644 --- a/drivers/net/ethernet/brocade/bna/bnad_debugfs.c +++ b/drivers/net/ethernet/brocade/bna/bnad_debugfs.c | |||
@@ -62,8 +62,6 @@ bnad_debugfs_open_fwtrc(struct inode *inode, struct file *file) | |||
62 | if (!fw_debug->debug_buffer) { | 62 | if (!fw_debug->debug_buffer) { |
63 | kfree(fw_debug); | 63 | kfree(fw_debug); |
64 | fw_debug = NULL; | 64 | fw_debug = NULL; |
65 | pr_warn("bna %s: Failed to allocate fwtrc buffer\n", | ||
66 | pci_name(bnad->pcidev)); | ||
67 | return -ENOMEM; | 65 | return -ENOMEM; |
68 | } | 66 | } |
69 | 67 | ||
@@ -105,8 +103,6 @@ bnad_debugfs_open_fwsave(struct inode *inode, struct file *file) | |||
105 | if (!fw_debug->debug_buffer) { | 103 | if (!fw_debug->debug_buffer) { |
106 | kfree(fw_debug); | 104 | kfree(fw_debug); |
107 | fw_debug = NULL; | 105 | fw_debug = NULL; |
108 | pr_warn("bna %s: Failed to allocate fwsave buffer\n", | ||
109 | pci_name(bnad->pcidev)); | ||
110 | return -ENOMEM; | 106 | return -ENOMEM; |
111 | } | 107 | } |
112 | 108 | ||
@@ -208,8 +204,6 @@ bnad_debugfs_open_drvinfo(struct inode *inode, struct file *file) | |||
208 | if (!drv_info->debug_buffer) { | 204 | if (!drv_info->debug_buffer) { |
209 | kfree(drv_info); | 205 | kfree(drv_info); |
210 | drv_info = NULL; | 206 | drv_info = NULL; |
211 | pr_warn("bna %s: Failed to allocate drv info buffer\n", | ||
212 | pci_name(bnad->pcidev)); | ||
213 | return -ENOMEM; | 207 | return -ENOMEM; |
214 | } | 208 | } |
215 | 209 | ||
@@ -348,11 +342,8 @@ bnad_debugfs_write_regrd(struct file *file, const char __user *buf, | |||
348 | 342 | ||
349 | /* Allocate memory to store the user space buf */ | 343 | /* Allocate memory to store the user space buf */ |
350 | kern_buf = kzalloc(nbytes, GFP_KERNEL); | 344 | kern_buf = kzalloc(nbytes, GFP_KERNEL); |
351 | if (!kern_buf) { | 345 | if (!kern_buf) |
352 | pr_warn("bna %s: Failed to allocate user buffer\n", | ||
353 | pci_name(bnad->pcidev)); | ||
354 | return -ENOMEM; | 346 | return -ENOMEM; |
355 | } | ||
356 | 347 | ||
357 | if (copy_from_user(kern_buf, (void __user *)buf, nbytes)) { | 348 | if (copy_from_user(kern_buf, (void __user *)buf, nbytes)) { |
358 | kfree(kern_buf); | 349 | kfree(kern_buf); |
@@ -373,11 +364,8 @@ bnad_debugfs_write_regrd(struct file *file, const char __user *buf, | |||
373 | bnad->reglen = 0; | 364 | bnad->reglen = 0; |
374 | 365 | ||
375 | bnad->regdata = kzalloc(len << 2, GFP_KERNEL); | 366 | bnad->regdata = kzalloc(len << 2, GFP_KERNEL); |
376 | if (!bnad->regdata) { | 367 | if (!bnad->regdata) |
377 | pr_warn("bna %s: Failed to allocate regrd buffer\n", | ||
378 | pci_name(bnad->pcidev)); | ||
379 | return -ENOMEM; | 368 | return -ENOMEM; |
380 | } | ||
381 | 369 | ||
382 | bnad->reglen = len << 2; | 370 | bnad->reglen = len << 2; |
383 | rb = bfa_ioc_bar0(ioc); | 371 | rb = bfa_ioc_bar0(ioc); |
@@ -421,11 +409,8 @@ bnad_debugfs_write_regwr(struct file *file, const char __user *buf, | |||
421 | 409 | ||
422 | /* Allocate memory to store the user space buf */ | 410 | /* Allocate memory to store the user space buf */ |
423 | kern_buf = kzalloc(nbytes, GFP_KERNEL); | 411 | kern_buf = kzalloc(nbytes, GFP_KERNEL); |
424 | if (!kern_buf) { | 412 | if (!kern_buf) |
425 | pr_warn("bna %s: Failed to allocate user buffer\n", | ||
426 | pci_name(bnad->pcidev)); | ||
427 | return -ENOMEM; | 413 | return -ENOMEM; |
428 | } | ||
429 | 414 | ||
430 | if (copy_from_user(kern_buf, (void __user *)buf, nbytes)) { | 415 | if (copy_from_user(kern_buf, (void __user *)buf, nbytes)) { |
431 | kfree(kern_buf); | 416 | kfree(kern_buf); |
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c index ab3f67f980d8..07df13745c43 100644 --- a/drivers/net/ethernet/cisco/enic/enic_main.c +++ b/drivers/net/ethernet/cisco/enic/enic_main.c | |||
@@ -2388,7 +2388,6 @@ static int __devinit enic_probe(struct pci_dev *pdev, | |||
2388 | /* Allocate structure for port profiles */ | 2388 | /* Allocate structure for port profiles */ |
2389 | enic->pp = kcalloc(num_pps, sizeof(*enic->pp), GFP_KERNEL); | 2389 | enic->pp = kcalloc(num_pps, sizeof(*enic->pp), GFP_KERNEL); |
2390 | if (!enic->pp) { | 2390 | if (!enic->pp) { |
2391 | pr_err("port profile alloc failed, aborting\n"); | ||
2392 | err = -ENOMEM; | 2391 | err = -ENOMEM; |
2393 | goto err_out_disable_sriov_pp; | 2392 | goto err_out_disable_sriov_pp; |
2394 | } | 2393 | } |
diff --git a/drivers/net/ethernet/cisco/enic/vnic_rq.c b/drivers/net/ethernet/cisco/enic/vnic_rq.c index 34105e0951a5..7e1488fc8ab2 100644 --- a/drivers/net/ethernet/cisco/enic/vnic_rq.c +++ b/drivers/net/ethernet/cisco/enic/vnic_rq.c | |||
@@ -38,10 +38,8 @@ static int vnic_rq_alloc_bufs(struct vnic_rq *rq) | |||
38 | 38 | ||
39 | for (i = 0; i < blks; i++) { | 39 | for (i = 0; i < blks; i++) { |
40 | rq->bufs[i] = kzalloc(VNIC_RQ_BUF_BLK_SZ(count), GFP_ATOMIC); | 40 | rq->bufs[i] = kzalloc(VNIC_RQ_BUF_BLK_SZ(count), GFP_ATOMIC); |
41 | if (!rq->bufs[i]) { | 41 | if (!rq->bufs[i]) |
42 | pr_err("Failed to alloc rq_bufs\n"); | ||
43 | return -ENOMEM; | 42 | return -ENOMEM; |
44 | } | ||
45 | } | 43 | } |
46 | 44 | ||
47 | for (i = 0; i < blks; i++) { | 45 | for (i = 0; i < blks; i++) { |
diff --git a/drivers/net/ethernet/cisco/enic/vnic_wq.c b/drivers/net/ethernet/cisco/enic/vnic_wq.c index df61bd932ea6..5e0d7a2be9bc 100644 --- a/drivers/net/ethernet/cisco/enic/vnic_wq.c +++ b/drivers/net/ethernet/cisco/enic/vnic_wq.c | |||
@@ -38,10 +38,8 @@ static int vnic_wq_alloc_bufs(struct vnic_wq *wq) | |||
38 | 38 | ||
39 | for (i = 0; i < blks; i++) { | 39 | for (i = 0; i < blks; i++) { |
40 | wq->bufs[i] = kzalloc(VNIC_WQ_BUF_BLK_SZ(count), GFP_ATOMIC); | 40 | wq->bufs[i] = kzalloc(VNIC_WQ_BUF_BLK_SZ(count), GFP_ATOMIC); |
41 | if (!wq->bufs[i]) { | 41 | if (!wq->bufs[i]) |
42 | pr_err("Failed to alloc wq_bufs\n"); | ||
43 | return -ENOMEM; | 42 | return -ENOMEM; |
44 | } | ||
45 | } | 43 | } |
46 | 44 | ||
47 | for (i = 0; i < blks; i++) { | 45 | for (i = 0; i < blks; i++) { |
diff --git a/drivers/net/ethernet/i825xx/lp486e.c b/drivers/net/ethernet/i825xx/lp486e.c index 414044b3cb11..02df5f5accb1 100644 --- a/drivers/net/ethernet/i825xx/lp486e.c +++ b/drivers/net/ethernet/i825xx/lp486e.c | |||
@@ -454,8 +454,6 @@ init_rx_bufs(struct net_device *dev, int num) { | |||
454 | } | 454 | } |
455 | 455 | ||
456 | rfd->rbd = rbd; | 456 | rfd->rbd = rbd; |
457 | } else { | ||
458 | printk("Could not kmalloc rbd\n"); | ||
459 | } | 457 | } |
460 | } | 458 | } |
461 | lp->rbd_tail->next = rfd->rbd; | 459 | lp->rbd_tail->next = rfd->rbd; |
diff --git a/drivers/net/ethernet/ibm/emac/rgmii.c b/drivers/net/ethernet/ibm/emac/rgmii.c index 05484f918ee3..d3123282e18e 100644 --- a/drivers/net/ethernet/ibm/emac/rgmii.c +++ b/drivers/net/ethernet/ibm/emac/rgmii.c | |||
@@ -237,11 +237,8 @@ static int __devinit rgmii_probe(struct platform_device *ofdev) | |||
237 | 237 | ||
238 | rc = -ENOMEM; | 238 | rc = -ENOMEM; |
239 | dev = kzalloc(sizeof(struct rgmii_instance), GFP_KERNEL); | 239 | dev = kzalloc(sizeof(struct rgmii_instance), GFP_KERNEL); |
240 | if (dev == NULL) { | 240 | if (dev == NULL) |
241 | printk(KERN_ERR "%s: could not allocate RGMII device!\n", | ||
242 | np->full_name); | ||
243 | goto err_gone; | 241 | goto err_gone; |
244 | } | ||
245 | 242 | ||
246 | mutex_init(&dev->lock); | 243 | mutex_init(&dev->lock); |
247 | dev->ofdev = ofdev; | 244 | dev->ofdev = ofdev; |
diff --git a/drivers/net/ethernet/ibm/emac/tah.c b/drivers/net/ethernet/ibm/emac/tah.c index 0d9881efe2ff..872912ef518d 100644 --- a/drivers/net/ethernet/ibm/emac/tah.c +++ b/drivers/net/ethernet/ibm/emac/tah.c | |||
@@ -96,11 +96,8 @@ static int __devinit tah_probe(struct platform_device *ofdev) | |||
96 | 96 | ||
97 | rc = -ENOMEM; | 97 | rc = -ENOMEM; |
98 | dev = kzalloc(sizeof(struct tah_instance), GFP_KERNEL); | 98 | dev = kzalloc(sizeof(struct tah_instance), GFP_KERNEL); |
99 | if (dev == NULL) { | 99 | if (dev == NULL) |
100 | printk(KERN_ERR "%s: could not allocate TAH device!\n", | ||
101 | np->full_name); | ||
102 | goto err_gone; | 100 | goto err_gone; |
103 | } | ||
104 | 101 | ||
105 | mutex_init(&dev->lock); | 102 | mutex_init(&dev->lock); |
106 | dev->ofdev = ofdev; | 103 | dev->ofdev = ofdev; |
diff --git a/drivers/net/ethernet/ibm/emac/zmii.c b/drivers/net/ethernet/ibm/emac/zmii.c index e799a6116ba5..415e9b4d5408 100644 --- a/drivers/net/ethernet/ibm/emac/zmii.c +++ b/drivers/net/ethernet/ibm/emac/zmii.c | |||
@@ -240,11 +240,8 @@ static int __devinit zmii_probe(struct platform_device *ofdev) | |||
240 | 240 | ||
241 | rc = -ENOMEM; | 241 | rc = -ENOMEM; |
242 | dev = kzalloc(sizeof(struct zmii_instance), GFP_KERNEL); | 242 | dev = kzalloc(sizeof(struct zmii_instance), GFP_KERNEL); |
243 | if (dev == NULL) { | 243 | if (dev == NULL) |
244 | printk(KERN_ERR "%s: could not allocate ZMII device!\n", | ||
245 | np->full_name); | ||
246 | goto err_gone; | 244 | goto err_gone; |
247 | } | ||
248 | 245 | ||
249 | mutex_init(&dev->lock); | 246 | mutex_init(&dev->lock); |
250 | dev->ofdev = ofdev; | 247 | dev->ofdev = ofdev; |
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index 669ca3800c01..363fd395c75b 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c | |||
@@ -730,10 +730,8 @@ static void e1000_dump_eeprom(struct e1000_adapter *adapter) | |||
730 | eeprom.offset = 0; | 730 | eeprom.offset = 0; |
731 | 731 | ||
732 | data = kmalloc(eeprom.len, GFP_KERNEL); | 732 | data = kmalloc(eeprom.len, GFP_KERNEL); |
733 | if (!data) { | 733 | if (!data) |
734 | pr_err("Unable to allocate memory to dump EEPROM data\n"); | ||
735 | return; | 734 | return; |
736 | } | ||
737 | 735 | ||
738 | ops->get_eeprom(netdev, &eeprom, data); | 736 | ops->get_eeprom(netdev, &eeprom, data); |
739 | 737 | ||
diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_main.c b/drivers/net/ethernet/intel/ixgb/ixgb_main.c index 9bd5faf64a85..002478801a1b 100644 --- a/drivers/net/ethernet/intel/ixgb/ixgb_main.c +++ b/drivers/net/ethernet/intel/ixgb/ixgb_main.c | |||
@@ -1136,10 +1136,8 @@ ixgb_set_multi(struct net_device *netdev) | |||
1136 | u8 *mta = kmalloc(IXGB_MAX_NUM_MULTICAST_ADDRESSES * | 1136 | u8 *mta = kmalloc(IXGB_MAX_NUM_MULTICAST_ADDRESSES * |
1137 | ETH_ALEN, GFP_ATOMIC); | 1137 | ETH_ALEN, GFP_ATOMIC); |
1138 | u8 *addr; | 1138 | u8 *addr; |
1139 | if (!mta) { | 1139 | if (!mta) |
1140 | pr_err("allocation of multicast memory failed\n"); | ||
1141 | goto alloc_failed; | 1140 | goto alloc_failed; |
1142 | } | ||
1143 | 1141 | ||
1144 | IXGB_WRITE_REG(hw, RCTL, rctl); | 1142 | IXGB_WRITE_REG(hw, RCTL, rctl); |
1145 | 1143 | ||
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index bed411bada21..f3bc9333a082 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | |||
@@ -2517,12 +2517,8 @@ int ixgbevf_setup_rx_resources(struct ixgbevf_adapter *adapter, | |||
2517 | 2517 | ||
2518 | size = sizeof(struct ixgbevf_rx_buffer) * rx_ring->count; | 2518 | size = sizeof(struct ixgbevf_rx_buffer) * rx_ring->count; |
2519 | rx_ring->rx_buffer_info = vzalloc(size); | 2519 | rx_ring->rx_buffer_info = vzalloc(size); |
2520 | if (!rx_ring->rx_buffer_info) { | 2520 | if (!rx_ring->rx_buffer_info) |
2521 | hw_dbg(&adapter->hw, | ||
2522 | "Unable to vmalloc buffer memory for " | ||
2523 | "the receive descriptor ring\n"); | ||
2524 | goto alloc_failed; | 2521 | goto alloc_failed; |
2525 | } | ||
2526 | 2522 | ||
2527 | /* Round up to nearest 4K */ | 2523 | /* Round up to nearest 4K */ |
2528 | rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc); | 2524 | rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc); |
diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index 6ad094f176f8..341d10130dca 100644 --- a/drivers/net/ethernet/korina.c +++ b/drivers/net/ethernet/korina.c | |||
@@ -1150,7 +1150,6 @@ static int korina_probe(struct platform_device *pdev) | |||
1150 | 1150 | ||
1151 | lp->td_ring = kmalloc(TD_RING_SIZE + RD_RING_SIZE, GFP_KERNEL); | 1151 | lp->td_ring = kmalloc(TD_RING_SIZE + RD_RING_SIZE, GFP_KERNEL); |
1152 | if (!lp->td_ring) { | 1152 | if (!lp->td_ring) { |
1153 | printk(KERN_ERR DRV_NAME ": cannot allocate descriptors\n"); | ||
1154 | rc = -ENXIO; | 1153 | rc = -ENXIO; |
1155 | goto probe_err_td_ring; | 1154 | goto probe_err_td_ring; |
1156 | } | 1155 | } |
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c index 953ba5851f7b..92b4b4e68e3b 100644 --- a/drivers/net/ethernet/marvell/pxa168_eth.c +++ b/drivers/net/ethernet/marvell/pxa168_eth.c | |||
@@ -1017,10 +1017,9 @@ static int rxq_init(struct net_device *dev) | |||
1017 | /* Allocate RX skb rings */ | 1017 | /* Allocate RX skb rings */ |
1018 | pep->rx_skb = kmalloc(sizeof(*pep->rx_skb) * pep->rx_ring_size, | 1018 | pep->rx_skb = kmalloc(sizeof(*pep->rx_skb) * pep->rx_ring_size, |
1019 | GFP_KERNEL); | 1019 | GFP_KERNEL); |
1020 | if (!pep->rx_skb) { | 1020 | if (!pep->rx_skb) |
1021 | printk(KERN_ERR "%s: Cannot alloc RX skb ring\n", dev->name); | ||
1022 | return -ENOMEM; | 1021 | return -ENOMEM; |
1023 | } | 1022 | |
1024 | /* Allocate RX ring */ | 1023 | /* Allocate RX ring */ |
1025 | pep->rx_desc_count = 0; | 1024 | pep->rx_desc_count = 0; |
1026 | size = pep->rx_ring_size * sizeof(struct rx_desc); | 1025 | size = pep->rx_ring_size * sizeof(struct rx_desc); |
@@ -1081,10 +1080,9 @@ static int txq_init(struct net_device *dev) | |||
1081 | 1080 | ||
1082 | pep->tx_skb = kmalloc(sizeof(*pep->tx_skb) * pep->tx_ring_size, | 1081 | pep->tx_skb = kmalloc(sizeof(*pep->tx_skb) * pep->tx_ring_size, |
1083 | GFP_KERNEL); | 1082 | GFP_KERNEL); |
1084 | if (!pep->tx_skb) { | 1083 | if (!pep->tx_skb) |
1085 | printk(KERN_ERR "%s: Cannot alloc TX skb ring\n", dev->name); | ||
1086 | return -ENOMEM; | 1084 | return -ENOMEM; |
1087 | } | 1085 | |
1088 | /* Allocate TX ring */ | 1086 | /* Allocate TX ring */ |
1089 | pep->tx_desc_count = 0; | 1087 | pep->tx_desc_count = 0; |
1090 | size = pep->tx_ring_size * sizeof(struct tx_desc); | 1088 | size = pep->tx_ring_size * sizeof(struct tx_desc); |
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c index 971d4b6b8dfe..f61d0e08f52b 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c | |||
@@ -281,10 +281,9 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv, | |||
281 | tmp = size * roundup_pow_of_two(MLX4_EN_MAX_RX_FRAGS * | 281 | tmp = size * roundup_pow_of_two(MLX4_EN_MAX_RX_FRAGS * |
282 | sizeof(struct skb_frag_struct)); | 282 | sizeof(struct skb_frag_struct)); |
283 | ring->rx_info = vmalloc(tmp); | 283 | ring->rx_info = vmalloc(tmp); |
284 | if (!ring->rx_info) { | 284 | if (!ring->rx_info) |
285 | en_err(priv, "Failed allocating rx_info ring\n"); | ||
286 | return -ENOMEM; | 285 | return -ENOMEM; |
287 | } | 286 | |
288 | en_dbg(DRV, priv, "Allocated rx_info ring at addr:%p size:%d\n", | 287 | en_dbg(DRV, priv, "Allocated rx_info ring at addr:%p size:%d\n", |
289 | ring->rx_info, tmp); | 288 | ring->rx_info, tmp); |
290 | 289 | ||
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c index 9ef9038d0629..ff3250586584 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c | |||
@@ -71,16 +71,14 @@ int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv, | |||
71 | 71 | ||
72 | tmp = size * sizeof(struct mlx4_en_tx_info); | 72 | tmp = size * sizeof(struct mlx4_en_tx_info); |
73 | ring->tx_info = vmalloc(tmp); | 73 | ring->tx_info = vmalloc(tmp); |
74 | if (!ring->tx_info) { | 74 | if (!ring->tx_info) |
75 | en_err(priv, "Failed allocating tx_info ring\n"); | ||
76 | return -ENOMEM; | 75 | return -ENOMEM; |
77 | } | 76 | |
78 | en_dbg(DRV, priv, "Allocated tx_info ring at addr:%p size:%d\n", | 77 | en_dbg(DRV, priv, "Allocated tx_info ring at addr:%p size:%d\n", |
79 | ring->tx_info, tmp); | 78 | ring->tx_info, tmp); |
80 | 79 | ||
81 | ring->bounce_buf = kmalloc(MAX_DESC_SIZE, GFP_KERNEL); | 80 | ring->bounce_buf = kmalloc(MAX_DESC_SIZE, GFP_KERNEL); |
82 | if (!ring->bounce_buf) { | 81 | if (!ring->bounce_buf) { |
83 | en_err(priv, "Failed allocating bounce buffer\n"); | ||
84 | err = -ENOMEM; | 82 | err = -ENOMEM; |
85 | goto err_tx; | 83 | goto err_tx; |
86 | } | 84 | } |
diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c index a37264e61a20..4a9d57fb9fb4 100644 --- a/drivers/net/ethernet/micrel/ks8851_mll.c +++ b/drivers/net/ethernet/micrel/ks8851_mll.c | |||
@@ -1501,10 +1501,8 @@ static int ks_hw_init(struct ks_net *ks) | |||
1501 | ks->mcast_lst_size = 0; | 1501 | ks->mcast_lst_size = 0; |
1502 | 1502 | ||
1503 | ks->frame_head_info = kmalloc(MHEADER_SIZE, GFP_KERNEL); | 1503 | ks->frame_head_info = kmalloc(MHEADER_SIZE, GFP_KERNEL); |
1504 | if (!ks->frame_head_info) { | 1504 | if (!ks->frame_head_info) |
1505 | pr_err("Error: Fail to allocate frame memory\n"); | ||
1506 | return false; | 1505 | return false; |
1507 | } | ||
1508 | 1506 | ||
1509 | ks_set_mac(ks, KS_DEFAULT_MAC_ADDRESS); | 1507 | ks_set_mac(ks, KS_DEFAULT_MAC_ADDRESS); |
1510 | return true; | 1508 | return true; |
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c index 3ead111111e1..0217991fede7 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | |||
@@ -1587,10 +1587,8 @@ int pch_gbe_setup_tx_resources(struct pch_gbe_adapter *adapter, | |||
1587 | 1587 | ||
1588 | size = (int)sizeof(struct pch_gbe_buffer) * tx_ring->count; | 1588 | size = (int)sizeof(struct pch_gbe_buffer) * tx_ring->count; |
1589 | tx_ring->buffer_info = vzalloc(size); | 1589 | tx_ring->buffer_info = vzalloc(size); |
1590 | if (!tx_ring->buffer_info) { | 1590 | if (!tx_ring->buffer_info) |
1591 | pr_err("Unable to allocate memory for the buffer information\n"); | ||
1592 | return -ENOMEM; | 1591 | return -ENOMEM; |
1593 | } | ||
1594 | 1592 | ||
1595 | tx_ring->size = tx_ring->count * (int)sizeof(struct pch_gbe_tx_desc); | 1593 | tx_ring->size = tx_ring->count * (int)sizeof(struct pch_gbe_tx_desc); |
1596 | 1594 | ||
@@ -1636,10 +1634,9 @@ int pch_gbe_setup_rx_resources(struct pch_gbe_adapter *adapter, | |||
1636 | 1634 | ||
1637 | size = (int)sizeof(struct pch_gbe_buffer) * rx_ring->count; | 1635 | size = (int)sizeof(struct pch_gbe_buffer) * rx_ring->count; |
1638 | rx_ring->buffer_info = vzalloc(size); | 1636 | rx_ring->buffer_info = vzalloc(size); |
1639 | if (!rx_ring->buffer_info) { | 1637 | if (!rx_ring->buffer_info) |
1640 | pr_err("Unable to allocate memory for the receive descriptor ring\n"); | ||
1641 | return -ENOMEM; | 1638 | return -ENOMEM; |
1642 | } | 1639 | |
1643 | rx_ring->size = rx_ring->count * (int)sizeof(struct pch_gbe_rx_desc); | 1640 | rx_ring->size = rx_ring->count * (int)sizeof(struct pch_gbe_rx_desc); |
1644 | rx_ring->desc = dma_alloc_coherent(&pdev->dev, rx_ring->size, | 1641 | rx_ring->desc = dma_alloc_coherent(&pdev->dev, rx_ring->size, |
1645 | &rx_ring->dma, GFP_KERNEL); | 1642 | &rx_ring->dma, GFP_KERNEL); |
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c index a8259cc19a63..094d26c51816 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c | |||
@@ -280,13 +280,10 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter) | |||
280 | 280 | ||
281 | } | 281 | } |
282 | rds_ring->rx_buf_arr = vzalloc(RCV_BUFF_RINGSIZE(rds_ring)); | 282 | rds_ring->rx_buf_arr = vzalloc(RCV_BUFF_RINGSIZE(rds_ring)); |
283 | if (rds_ring->rx_buf_arr == NULL) { | 283 | if (rds_ring->rx_buf_arr == NULL) |
284 | printk(KERN_ERR "%s: Failed to allocate " | ||
285 | "rx buffer ring %d\n", | ||
286 | netdev->name, ring); | ||
287 | /* free whatever was already allocated */ | 284 | /* free whatever was already allocated */ |
288 | goto err_out; | 285 | goto err_out; |
289 | } | 286 | |
290 | INIT_LIST_HEAD(&rds_ring->free_list); | 287 | INIT_LIST_HEAD(&rds_ring->free_list); |
291 | /* | 288 | /* |
292 | * Now go through all of them, set reference handles | 289 | * Now go through all of them, set reference handles |
@@ -480,11 +477,8 @@ int netxen_pinit_from_rom(struct netxen_adapter *adapter) | |||
480 | } | 477 | } |
481 | 478 | ||
482 | buf = kcalloc(n, sizeof(struct crb_addr_pair), GFP_KERNEL); | 479 | buf = kcalloc(n, sizeof(struct crb_addr_pair), GFP_KERNEL); |
483 | if (buf == NULL) { | 480 | if (buf == NULL) |
484 | printk("%s: netxen_pinit_from_rom: Unable to calloc memory.\n", | ||
485 | netxen_nic_driver_name); | ||
486 | return -ENOMEM; | 481 | return -ENOMEM; |
487 | } | ||
488 | 482 | ||
489 | for (i = 0; i < n; i++) { | 483 | for (i = 0; i < n; i++) { |
490 | if (netxen_rom_fast_read(adapter, 8*i + 4*offset, &val) != 0 || | 484 | if (netxen_rom_fast_read(adapter, 8*i + 4*offset, &val) != 0 || |
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_dbg.c b/drivers/net/ethernet/qlogic/qlge/qlge_dbg.c index fca804f36d61..58185b604b72 100644 --- a/drivers/net/ethernet/qlogic/qlge/qlge_dbg.c +++ b/drivers/net/ethernet/qlogic/qlge/qlge_dbg.c | |||
@@ -1824,10 +1824,8 @@ void ql_dump_hw_cb(struct ql_adapter *qdev, int size, u32 bit, u16 q_id) | |||
1824 | pr_err("%s: Enter\n", __func__); | 1824 | pr_err("%s: Enter\n", __func__); |
1825 | 1825 | ||
1826 | ptr = kmalloc(size, GFP_ATOMIC); | 1826 | ptr = kmalloc(size, GFP_ATOMIC); |
1827 | if (ptr == NULL) { | 1827 | if (ptr == NULL) |
1828 | pr_err("%s: Couldn't allocate a buffer\n", __func__); | ||
1829 | return; | 1828 | return; |
1830 | } | ||
1831 | 1829 | ||
1832 | if (ql_write_cfg(qdev, ptr, size, bit, q_id)) { | 1830 | if (ql_write_cfg(qdev, ptr, size, bit, q_id)) { |
1833 | pr_err("%s: Failed to upload control block!\n", __func__); | 1831 | pr_err("%s: Failed to upload control block!\n", __func__); |
diff --git a/drivers/net/ethernet/sis/sis900.c b/drivers/net/ethernet/sis/sis900.c index c8efc708c792..91c44688bc3e 100644 --- a/drivers/net/ethernet/sis/sis900.c +++ b/drivers/net/ethernet/sis/sis900.c | |||
@@ -619,7 +619,6 @@ static int __devinit sis900_mii_probe(struct net_device * net_dev) | |||
619 | } | 619 | } |
620 | 620 | ||
621 | if ((mii_phy = kmalloc(sizeof(struct mii_phy), GFP_KERNEL)) == NULL) { | 621 | if ((mii_phy = kmalloc(sizeof(struct mii_phy), GFP_KERNEL)) == NULL) { |
622 | printk(KERN_WARNING "Cannot allocate mem for struct mii_phy\n"); | ||
623 | mii_phy = sis_priv->first_mii; | 622 | mii_phy = sis_priv->first_mii; |
624 | while (mii_phy) { | 623 | while (mii_phy) { |
625 | struct mii_phy *phy; | 624 | struct mii_phy *phy; |
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 96fa2da30763..ffc7581879b1 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
@@ -954,10 +954,9 @@ static int stmmac_open(struct net_device *dev) | |||
954 | 954 | ||
955 | #ifdef CONFIG_STMMAC_TIMER | 955 | #ifdef CONFIG_STMMAC_TIMER |
956 | priv->tm = kzalloc(sizeof(struct stmmac_timer *), GFP_KERNEL); | 956 | priv->tm = kzalloc(sizeof(struct stmmac_timer *), GFP_KERNEL); |
957 | if (unlikely(priv->tm == NULL)) { | 957 | if (unlikely(priv->tm == NULL)) |
958 | pr_err("%s: ERROR: timer memory alloc failed\n", __func__); | ||
959 | return -ENOMEM; | 958 | return -ENOMEM; |
960 | } | 959 | |
961 | priv->tm->freq = tmrate; | 960 | priv->tm->freq = tmrate; |
962 | 961 | ||
963 | /* Test if the external timer can be actually used. | 962 | /* Test if the external timer can be actually used. |
diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c index f10665f594c4..46d84abe553d 100644 --- a/drivers/net/ethernet/sun/cassini.c +++ b/drivers/net/ethernet/sun/cassini.c | |||
@@ -835,7 +835,6 @@ static int cas_saturn_firmware_init(struct cas *cp) | |||
835 | cp->fw_data = vmalloc(cp->fw_size); | 835 | cp->fw_data = vmalloc(cp->fw_size); |
836 | if (!cp->fw_data) { | 836 | if (!cp->fw_data) { |
837 | err = -ENOMEM; | 837 | err = -ENOMEM; |
838 | pr_err("\"%s\" Failed %d\n", fw_name, err); | ||
839 | goto out; | 838 | goto out; |
840 | } | 839 | } |
841 | memcpy(cp->fw_data, &fw->data[2], cp->fw_size); | 840 | memcpy(cp->fw_data, &fw->data[2], cp->fw_size); |
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c index 8c6c059f3489..2896f6e9672b 100644 --- a/drivers/net/ethernet/sun/sunvnet.c +++ b/drivers/net/ethernet/sun/sunvnet.c | |||
@@ -949,10 +949,9 @@ static int __devinit vnet_port_alloc_tx_bufs(struct vnet_port *port) | |||
949 | int map_len = (ETH_FRAME_LEN + 7) & ~7; | 949 | int map_len = (ETH_FRAME_LEN + 7) & ~7; |
950 | 950 | ||
951 | err = -ENOMEM; | 951 | err = -ENOMEM; |
952 | if (!buf) { | 952 | if (!buf) |
953 | pr_err("TX buffer allocation failure\n"); | ||
954 | goto err_out; | 953 | goto err_out; |
955 | } | 954 | |
956 | err = -EFAULT; | 955 | err = -EFAULT; |
957 | if ((unsigned long)buf & (8UL - 1)) { | 956 | if ((unsigned long)buf & (8UL - 1)) { |
958 | pr_err("TX buffer misaligned\n"); | 957 | pr_err("TX buffer misaligned\n"); |
@@ -1165,10 +1164,8 @@ static int __devinit vnet_port_probe(struct vio_dev *vdev, | |||
1165 | 1164 | ||
1166 | port = kzalloc(sizeof(*port), GFP_KERNEL); | 1165 | port = kzalloc(sizeof(*port), GFP_KERNEL); |
1167 | err = -ENOMEM; | 1166 | err = -ENOMEM; |
1168 | if (!port) { | 1167 | if (!port) |
1169 | pr_err("Cannot allocate vnet_port\n"); | ||
1170 | goto err_out_put_mdesc; | 1168 | goto err_out_put_mdesc; |
1171 | } | ||
1172 | 1169 | ||
1173 | for (i = 0; i < ETH_ALEN; i++) | 1170 | for (i = 0; i < ETH_ALEN; i++) |
1174 | port->raddr[i] = (*rmac >> (5 - i) * 8) & 0xff; | 1171 | port->raddr[i] = (*rmac >> (5 - i) * 8) & 0xff; |
diff --git a/drivers/net/ethernet/toshiba/ps3_gelic_wireless.c b/drivers/net/ethernet/toshiba/ps3_gelic_wireless.c index fd4ed7f8cfa1..5c14f82c4954 100644 --- a/drivers/net/ethernet/toshiba/ps3_gelic_wireless.c +++ b/drivers/net/ethernet/toshiba/ps3_gelic_wireless.c | |||
@@ -1621,10 +1621,9 @@ static void gelic_wl_scan_complete_event(struct gelic_wl_info *wl) | |||
1621 | kfree(target->hwinfo); | 1621 | kfree(target->hwinfo); |
1622 | target->hwinfo = kzalloc(be16_to_cpu(scan_info->size), | 1622 | target->hwinfo = kzalloc(be16_to_cpu(scan_info->size), |
1623 | GFP_KERNEL); | 1623 | GFP_KERNEL); |
1624 | if (!target->hwinfo) { | 1624 | if (!target->hwinfo) |
1625 | pr_info("%s: kzalloc failed\n", __func__); | ||
1626 | continue; | 1625 | continue; |
1627 | } | 1626 | |
1628 | /* copy hw scan info */ | 1627 | /* copy hw scan info */ |
1629 | memcpy(target->hwinfo, scan_info, scan_info->size); | 1628 | memcpy(target->hwinfo, scan_info, scan_info->size); |
1630 | target->essid_len = strnlen(scan_info->essid, | 1629 | target->essid_len = strnlen(scan_info->essid, |
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c index 96a98d2ff151..696327773fbe 100644 --- a/drivers/net/hamradio/yam.c +++ b/drivers/net/hamradio/yam.c | |||
@@ -403,7 +403,6 @@ static unsigned char *add_mcs(unsigned char *bits, int bitrate, | |||
403 | 403 | ||
404 | /* Allocate a new mcs */ | 404 | /* Allocate a new mcs */ |
405 | if ((p = kmalloc(sizeof(struct yam_mcs), GFP_KERNEL)) == NULL) { | 405 | if ((p = kmalloc(sizeof(struct yam_mcs), GFP_KERNEL)) == NULL) { |
406 | printk(KERN_WARNING "YAM: no memory to allocate mcs\n"); | ||
407 | release_firmware(fw); | 406 | release_firmware(fw); |
408 | return NULL; | 407 | return NULL; |
409 | } | 408 | } |
diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c index e68c941926f1..2a51363d9fed 100644 --- a/drivers/net/hippi/rrunner.c +++ b/drivers/net/hippi/rrunner.c | |||
@@ -1600,12 +1600,8 @@ static int rr_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
1600 | } | 1600 | } |
1601 | 1601 | ||
1602 | image = kmalloc(EEPROM_WORDS * sizeof(u32), GFP_KERNEL); | 1602 | image = kmalloc(EEPROM_WORDS * sizeof(u32), GFP_KERNEL); |
1603 | if (!image){ | 1603 | if (!image) |
1604 | printk(KERN_ERR "%s: Unable to allocate memory " | ||
1605 | "for EEPROM image\n", dev->name); | ||
1606 | return -ENOMEM; | 1604 | return -ENOMEM; |
1607 | } | ||
1608 | |||
1609 | 1605 | ||
1610 | if (rrpriv->fw_running){ | 1606 | if (rrpriv->fw_running){ |
1611 | printk("%s: Firmware already running\n", dev->name); | 1607 | printk("%s: Firmware already running\n", dev->name); |
@@ -1637,8 +1633,6 @@ static int rr_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
1637 | image = kmalloc(EEPROM_WORDS * sizeof(u32), GFP_KERNEL); | 1633 | image = kmalloc(EEPROM_WORDS * sizeof(u32), GFP_KERNEL); |
1638 | oldimage = kmalloc(EEPROM_WORDS * sizeof(u32), GFP_KERNEL); | 1634 | oldimage = kmalloc(EEPROM_WORDS * sizeof(u32), GFP_KERNEL); |
1639 | if (!image || !oldimage) { | 1635 | if (!image || !oldimage) { |
1640 | printk(KERN_ERR "%s: Unable to allocate memory " | ||
1641 | "for EEPROM image\n", dev->name); | ||
1642 | error = -ENOMEM; | 1636 | error = -ENOMEM; |
1643 | goto wf_out; | 1637 | goto wf_out; |
1644 | } | 1638 | } |
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c index 64f403da101c..617a446d126c 100644 --- a/drivers/net/irda/donauboe.c +++ b/drivers/net/irda/donauboe.c | |||
@@ -1608,7 +1608,6 @@ toshoboe_open (struct pci_dev *pci_dev, const struct pci_device_id *pdid) | |||
1608 | self->ringbuf = kmalloc(OBOE_RING_LEN << 1, GFP_KERNEL); | 1608 | self->ringbuf = kmalloc(OBOE_RING_LEN << 1, GFP_KERNEL); |
1609 | if (!self->ringbuf) | 1609 | if (!self->ringbuf) |
1610 | { | 1610 | { |
1611 | printk (KERN_ERR DRIVER_NAME ": can't allocate DMA buffers\n"); | ||
1612 | err = -ENOMEM; | 1611 | err = -ENOMEM; |
1613 | goto freeregion; | 1612 | goto freeregion; |
1614 | } | 1613 | } |
@@ -1647,7 +1646,6 @@ toshoboe_open (struct pci_dev *pci_dev, const struct pci_device_id *pdid) | |||
1647 | 1646 | ||
1648 | if (!ok) | 1647 | if (!ok) |
1649 | { | 1648 | { |
1650 | printk (KERN_ERR DRIVER_NAME ": can't allocate rx/tx buffers\n"); | ||
1651 | err = -ENOMEM; | 1649 | err = -ENOMEM; |
1652 | goto freebufs; | 1650 | goto freebufs; |
1653 | } | 1651 | } |
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index e8882023576b..f9347ea3d381 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c | |||
@@ -169,10 +169,8 @@ static struct netconsole_target *alloc_param_target(char *target_config) | |||
169 | * Note that these targets get their config_item fields zeroed-out. | 169 | * Note that these targets get their config_item fields zeroed-out. |
170 | */ | 170 | */ |
171 | nt = kzalloc(sizeof(*nt), GFP_KERNEL); | 171 | nt = kzalloc(sizeof(*nt), GFP_KERNEL); |
172 | if (!nt) { | 172 | if (!nt) |
173 | printk(KERN_ERR "netconsole: failed to allocate memory\n"); | ||
174 | goto fail; | 173 | goto fail; |
175 | } | ||
176 | 174 | ||
177 | nt->np.name = "netconsole"; | 175 | nt->np.name = "netconsole"; |
178 | strlcpy(nt->np.dev_name, "eth0", IFNAMSIZ); | 176 | strlcpy(nt->np.dev_name, "eth0", IFNAMSIZ); |
@@ -551,10 +549,8 @@ static struct config_item *make_netconsole_target(struct config_group *group, | |||
551 | * Target is disabled at creation (enabled == 0). | 549 | * Target is disabled at creation (enabled == 0). |
552 | */ | 550 | */ |
553 | nt = kzalloc(sizeof(*nt), GFP_KERNEL); | 551 | nt = kzalloc(sizeof(*nt), GFP_KERNEL); |
554 | if (!nt) { | 552 | if (!nt) |
555 | printk(KERN_ERR "netconsole: failed to allocate memory\n"); | ||
556 | return ERR_PTR(-ENOMEM); | 553 | return ERR_PTR(-ENOMEM); |
557 | } | ||
558 | 554 | ||
559 | nt->np.name = "netconsole"; | 555 | nt->np.name = "netconsole"; |
560 | strlcpy(nt->np.dev_name, "eth0", IFNAMSIZ); | 556 | strlcpy(nt->np.dev_name, "eth0", IFNAMSIZ); |
diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c index df884dde2a51..234cd9d87ed9 100644 --- a/drivers/net/ppp/pptp.c +++ b/drivers/net/ppp/pptp.c | |||
@@ -670,10 +670,8 @@ static int __init pptp_init_module(void) | |||
670 | pr_info("PPTP driver version " PPTP_DRIVER_VERSION "\n"); | 670 | pr_info("PPTP driver version " PPTP_DRIVER_VERSION "\n"); |
671 | 671 | ||
672 | callid_sock = vzalloc((MAX_CALLID + 1) * sizeof(void *)); | 672 | callid_sock = vzalloc((MAX_CALLID + 1) * sizeof(void *)); |
673 | if (!callid_sock) { | 673 | if (!callid_sock) |
674 | pr_err("PPTP: cann't allocate memory\n"); | ||
675 | return -ENOMEM; | 674 | return -ENOMEM; |
676 | } | ||
677 | 675 | ||
678 | err = gre_add_protocol(&gre_pptp_protocol, GREPROTO_PPTP); | 676 | err = gre_add_protocol(&gre_pptp_protocol, GREPROTO_PPTP); |
679 | if (err) { | 677 | if (err) { |
diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c index ba08341fb92c..69345dfae0fd 100644 --- a/drivers/net/slip/slip.c +++ b/drivers/net/slip/slip.c | |||
@@ -1296,10 +1296,8 @@ static int __init slip_init(void) | |||
1296 | 1296 | ||
1297 | slip_devs = kzalloc(sizeof(struct net_device *)*slip_maxdev, | 1297 | slip_devs = kzalloc(sizeof(struct net_device *)*slip_maxdev, |
1298 | GFP_KERNEL); | 1298 | GFP_KERNEL); |
1299 | if (!slip_devs) { | 1299 | if (!slip_devs) |
1300 | printk(KERN_ERR "SLIP: Can't allocate slip devices array.\n"); | ||
1301 | return -ENOMEM; | 1300 | return -ENOMEM; |
1302 | } | ||
1303 | 1301 | ||
1304 | /* Fill in our line protocol discipline, and register it */ | 1302 | /* Fill in our line protocol discipline, and register it */ |
1305 | status = tty_register_ldisc(N_SLIP, &sl_ldisc); | 1303 | status = tty_register_ldisc(N_SLIP, &sl_ldisc); |
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c index ef9fdf3652f6..d7c292aa76b1 100644 --- a/drivers/net/tokenring/3c359.c +++ b/drivers/net/tokenring/3c359.c | |||
@@ -674,15 +674,11 @@ static int xl_open(struct net_device *dev) | |||
674 | /* These MUST be on 8 byte boundaries */ | 674 | /* These MUST be on 8 byte boundaries */ |
675 | xl_priv->xl_tx_ring = kzalloc((sizeof(struct xl_tx_desc) * XL_TX_RING_SIZE) + 7, GFP_DMA | GFP_KERNEL); | 675 | xl_priv->xl_tx_ring = kzalloc((sizeof(struct xl_tx_desc) * XL_TX_RING_SIZE) + 7, GFP_DMA | GFP_KERNEL); |
676 | if (xl_priv->xl_tx_ring == NULL) { | 676 | if (xl_priv->xl_tx_ring == NULL) { |
677 | printk(KERN_WARNING "%s: Not enough memory to allocate tx buffers.\n", | ||
678 | dev->name); | ||
679 | free_irq(dev->irq,dev); | 677 | free_irq(dev->irq,dev); |
680 | return -ENOMEM; | 678 | return -ENOMEM; |
681 | } | 679 | } |
682 | xl_priv->xl_rx_ring = kzalloc((sizeof(struct xl_rx_desc) * XL_RX_RING_SIZE) +7, GFP_DMA | GFP_KERNEL); | 680 | xl_priv->xl_rx_ring = kzalloc((sizeof(struct xl_rx_desc) * XL_RX_RING_SIZE) +7, GFP_DMA | GFP_KERNEL); |
683 | if (xl_priv->xl_rx_ring == NULL) { | 681 | if (xl_priv->xl_rx_ring == NULL) { |
684 | printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers.\n", | ||
685 | dev->name); | ||
686 | free_irq(dev->irq,dev); | 682 | free_irq(dev->irq,dev); |
687 | kfree(xl_priv->xl_tx_ring); | 683 | kfree(xl_priv->xl_tx_ring); |
688 | return -ENOMEM; | 684 | return -ENOMEM; |
diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c index 6153cfd696b6..1cdc034f6aec 100644 --- a/drivers/net/tokenring/madgemc.c +++ b/drivers/net/tokenring/madgemc.c | |||
@@ -171,7 +171,6 @@ static int __devinit madgemc_probe(struct device *device) | |||
171 | 171 | ||
172 | card = kmalloc(sizeof(struct card_info), GFP_KERNEL); | 172 | card = kmalloc(sizeof(struct card_info), GFP_KERNEL); |
173 | if (card==NULL) { | 173 | if (card==NULL) { |
174 | printk("madgemc: unable to allocate card struct\n"); | ||
175 | ret = -ENOMEM; | 174 | ret = -ENOMEM; |
176 | goto getout1; | 175 | goto getout1; |
177 | } | 176 | } |
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, | |||
537 | 537 | ||
538 | tq->buf_info = kcalloc(tq->tx_ring.size, sizeof(tq->buf_info[0]), | 538 | tq->buf_info = kcalloc(tq->tx_ring.size, sizeof(tq->buf_info[0]), |
539 | GFP_KERNEL); | 539 | GFP_KERNEL); |
540 | if (!tq->buf_info) { | 540 | if (!tq->buf_info) |
541 | printk(KERN_ERR "%s: failed to allocate tx bufinfo\n", | ||
542 | adapter->netdev->name); | ||
543 | goto err; | 541 | goto err; |
544 | } | ||
545 | 542 | ||
546 | return 0; | 543 | return 0; |
547 | 544 | ||
@@ -1519,11 +1516,9 @@ vmxnet3_rq_create(struct vmxnet3_rx_queue *rq, struct vmxnet3_adapter *adapter) | |||
1519 | sz = sizeof(struct vmxnet3_rx_buf_info) * (rq->rx_ring[0].size + | 1516 | sz = sizeof(struct vmxnet3_rx_buf_info) * (rq->rx_ring[0].size + |
1520 | rq->rx_ring[1].size); | 1517 | rq->rx_ring[1].size); |
1521 | bi = kzalloc(sz, GFP_KERNEL); | 1518 | bi = kzalloc(sz, GFP_KERNEL); |
1522 | if (!bi) { | 1519 | if (!bi) |
1523 | printk(KERN_ERR "%s: failed to allocate rx bufinfo\n", | ||
1524 | adapter->netdev->name); | ||
1525 | goto err; | 1520 | goto err; |
1526 | } | 1521 | |
1527 | rq->buf_info[0] = bi; | 1522 | rq->buf_info[0] = bi; |
1528 | rq->buf_info[1] = bi + rq->rx_ring[0].size; | 1523 | rq->buf_info[1] = bi + rq->rx_ring[0].size; |
1529 | 1524 | ||
@@ -2964,8 +2959,6 @@ vmxnet3_probe_device(struct pci_dev *pdev, | |||
2964 | 2959 | ||
2965 | adapter->pm_conf = kmalloc(sizeof(struct Vmxnet3_PMConf), GFP_KERNEL); | 2960 | adapter->pm_conf = kmalloc(sizeof(struct Vmxnet3_PMConf), GFP_KERNEL); |
2966 | if (adapter->pm_conf == NULL) { | 2961 | if (adapter->pm_conf == NULL) { |
2967 | printk(KERN_ERR "Failed to allocate memory for %s\n", | ||
2968 | pci_name(pdev)); | ||
2969 | err = -ENOMEM; | 2962 | err = -ENOMEM; |
2970 | goto err_alloc_pm; | 2963 | goto err_alloc_pm; |
2971 | } | 2964 | } |
@@ -2974,8 +2967,6 @@ vmxnet3_probe_device(struct pci_dev *pdev, | |||
2974 | 2967 | ||
2975 | adapter->rss_conf = kmalloc(sizeof(struct UPT1_RSSConf), GFP_KERNEL); | 2968 | adapter->rss_conf = kmalloc(sizeof(struct UPT1_RSSConf), GFP_KERNEL); |
2976 | if (adapter->rss_conf == NULL) { | 2969 | if (adapter->rss_conf == NULL) { |
2977 | printk(KERN_ERR "Failed to allocate memory for %s\n", | ||
2978 | pci_name(pdev)); | ||
2979 | err = -ENOMEM; | 2970 | err = -ENOMEM; |
2980 | goto err_alloc_rss; | 2971 | goto err_alloc_rss; |
2981 | } | 2972 | } |
diff --git a/drivers/net/wan/c101.c b/drivers/net/wan/c101.c index 54f995f4a5a3..09a50751763b 100644 --- a/drivers/net/wan/c101.c +++ b/drivers/net/wan/c101.c | |||
@@ -325,10 +325,8 @@ static int __init c101_run(unsigned long irq, unsigned long winbase) | |||
325 | } | 325 | } |
326 | 326 | ||
327 | card = kzalloc(sizeof(card_t), GFP_KERNEL); | 327 | card = kzalloc(sizeof(card_t), GFP_KERNEL); |
328 | if (card == NULL) { | 328 | if (card == NULL) |
329 | pr_err("unable to allocate memory\n"); | ||
330 | return -ENOBUFS; | 329 | return -ENOBUFS; |
331 | } | ||
332 | 330 | ||
333 | card->dev = alloc_hdlcdev(card); | 331 | card->dev = alloc_hdlcdev(card); |
334 | if (!card->dev) { | 332 | if (!card->dev) { |
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c index 058e1697c174..fe8d060d8fff 100644 --- a/drivers/net/wan/dscc4.c +++ b/drivers/net/wan/dscc4.c | |||
@@ -903,10 +903,8 @@ static int dscc4_found1(struct pci_dev *pdev, void __iomem *ioaddr) | |||
903 | int i, ret = -ENOMEM; | 903 | int i, ret = -ENOMEM; |
904 | 904 | ||
905 | root = kcalloc(dev_per_card, sizeof(*root), GFP_KERNEL); | 905 | root = kcalloc(dev_per_card, sizeof(*root), GFP_KERNEL); |
906 | if (!root) { | 906 | if (!root) |
907 | pr_err("can't allocate data\n"); | ||
908 | goto err_out; | 907 | goto err_out; |
909 | } | ||
910 | 908 | ||
911 | for (i = 0; i < dev_per_card; i++) { | 909 | for (i = 0; i < dev_per_card; i++) { |
912 | root[i].dev = alloc_hdlcdev(root + i); | 910 | root[i].dev = alloc_hdlcdev(root + i); |
@@ -915,10 +913,8 @@ static int dscc4_found1(struct pci_dev *pdev, void __iomem *ioaddr) | |||
915 | } | 913 | } |
916 | 914 | ||
917 | ppriv = kzalloc(sizeof(*ppriv), GFP_KERNEL); | 915 | ppriv = kzalloc(sizeof(*ppriv), GFP_KERNEL); |
918 | if (!ppriv) { | 916 | if (!ppriv) |
919 | pr_err("can't allocate private data\n"); | ||
920 | goto err_free_dev; | 917 | goto err_free_dev; |
921 | } | ||
922 | 918 | ||
923 | ppriv->root = root; | 919 | ppriv->root = root; |
924 | spin_lock_init(&ppriv->lock); | 920 | spin_lock_init(&ppriv->lock); |
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index b7f2358d23be..76a8a4a522e9 100644 --- a/drivers/net/wan/lmc/lmc_main.c +++ b/drivers/net/wan/lmc/lmc_main.c | |||
@@ -497,7 +497,6 @@ int lmc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/ | |||
497 | 497 | ||
498 | data = kmalloc(xc.len, GFP_KERNEL); | 498 | data = kmalloc(xc.len, GFP_KERNEL); |
499 | if (!data) { | 499 | if (!data) { |
500 | printk(KERN_WARNING "%s: Failed to allocate memory for copy\n", dev->name); | ||
501 | ret = -ENOMEM; | 500 | ret = -ENOMEM; |
502 | break; | 501 | break; |
503 | } | 502 | } |
diff --git a/drivers/net/wan/n2.c b/drivers/net/wan/n2.c index 5129ad514d26..315bf09d6a20 100644 --- a/drivers/net/wan/n2.c +++ b/drivers/net/wan/n2.c | |||
@@ -358,10 +358,8 @@ static int __init n2_run(unsigned long io, unsigned long irq, | |||
358 | } | 358 | } |
359 | 359 | ||
360 | card = kzalloc(sizeof(card_t), GFP_KERNEL); | 360 | card = kzalloc(sizeof(card_t), GFP_KERNEL); |
361 | if (card == NULL) { | 361 | if (card == NULL) |
362 | pr_err("unable to allocate memory\n"); | ||
363 | return -ENOBUFS; | 362 | return -ENOBUFS; |
364 | } | ||
365 | 363 | ||
366 | card->ports[0].dev = alloc_hdlcdev(&card->ports[0]); | 364 | card->ports[0].dev = alloc_hdlcdev(&card->ports[0]); |
367 | card->ports[1].dev = alloc_hdlcdev(&card->ports[1]); | 365 | card->ports[1].dev = alloc_hdlcdev(&card->ports[1]); |
diff --git a/drivers/net/wan/pc300too.c b/drivers/net/wan/pc300too.c index c49c1b3c7aad..5fe246e060d7 100644 --- a/drivers/net/wan/pc300too.c +++ b/drivers/net/wan/pc300too.c | |||
@@ -320,7 +320,6 @@ static int __devinit pc300_pci_init_one(struct pci_dev *pdev, | |||
320 | 320 | ||
321 | card = kzalloc(sizeof(card_t), GFP_KERNEL); | 321 | card = kzalloc(sizeof(card_t), GFP_KERNEL); |
322 | if (card == NULL) { | 322 | if (card == NULL) { |
323 | pr_err("unable to allocate memory\n"); | ||
324 | pci_release_regions(pdev); | 323 | pci_release_regions(pdev); |
325 | pci_disable_device(pdev); | 324 | pci_disable_device(pdev); |
326 | return -ENOBUFS; | 325 | return -ENOBUFS; |
diff --git a/drivers/net/wan/pci200syn.c b/drivers/net/wan/pci200syn.c index 1ce21163c776..9659fcaa34ed 100644 --- a/drivers/net/wan/pci200syn.c +++ b/drivers/net/wan/pci200syn.c | |||
@@ -299,7 +299,6 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev, | |||
299 | 299 | ||
300 | card = kzalloc(sizeof(card_t), GFP_KERNEL); | 300 | card = kzalloc(sizeof(card_t), GFP_KERNEL); |
301 | if (card == NULL) { | 301 | if (card == NULL) { |
302 | pr_err("unable to allocate memory\n"); | ||
303 | pci_release_regions(pdev); | 302 | pci_release_regions(pdev); |
304 | pci_disable_device(pdev); | 303 | pci_disable_device(pdev); |
305 | return -ENOBUFS; | 304 | return -ENOBUFS; |
diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index 44b707197258..feb7541b33fb 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c | |||
@@ -604,7 +604,6 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev, | |||
604 | alloc_size = sizeof(card_t) + ports * sizeof(port_t); | 604 | alloc_size = sizeof(card_t) + ports * sizeof(port_t); |
605 | card = kzalloc(alloc_size, GFP_KERNEL); | 605 | card = kzalloc(alloc_size, GFP_KERNEL); |
606 | if (card == NULL) { | 606 | if (card == NULL) { |
607 | pr_err("%s: unable to allocate memory\n", pci_name(pdev)); | ||
608 | pci_release_regions(pdev); | 607 | pci_release_regions(pdev); |
609 | pci_disable_device(pdev); | 608 | pci_disable_device(pdev); |
610 | return -ENOBUFS; | 609 | return -ENOBUFS; |
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 8a10bb730d5a..e862369b4a6d 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c | |||
@@ -786,10 +786,8 @@ static int __init init_x25_asy(void) | |||
786 | 786 | ||
787 | x25_asy_devs = kcalloc(x25_asy_maxdev, sizeof(struct net_device *), | 787 | x25_asy_devs = kcalloc(x25_asy_maxdev, sizeof(struct net_device *), |
788 | GFP_KERNEL); | 788 | GFP_KERNEL); |
789 | if (!x25_asy_devs) { | 789 | if (!x25_asy_devs) |
790 | pr_warn("Can't allocate x25_asy_ctrls[] array! Uaargh! (-> No X.25 available)\n"); | ||
791 | return -ENOMEM; | 790 | return -ENOMEM; |
792 | } | ||
793 | 791 | ||
794 | return tty_register_ldisc(N_X25, &x25_ldisc); | 792 | return tty_register_ldisc(N_X25, &x25_ldisc); |
795 | } | 793 | } |
diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c index 1b90ed8795c3..c25226a32ddc 100644 --- a/drivers/net/wireless/ath/ath9k/htc_hst.c +++ b/drivers/net/wireless/ath/ath9k/htc_hst.c | |||
@@ -431,11 +431,8 @@ struct htc_target *ath9k_htc_hw_alloc(void *hif_handle, | |||
431 | struct htc_target *target; | 431 | struct htc_target *target; |
432 | 432 | ||
433 | target = kzalloc(sizeof(struct htc_target), GFP_KERNEL); | 433 | target = kzalloc(sizeof(struct htc_target), GFP_KERNEL); |
434 | if (!target) { | 434 | if (!target) |
435 | printk(KERN_ERR "Unable to allocate memory for" | ||
436 | "target device\n"); | ||
437 | return NULL; | 435 | return NULL; |
438 | } | ||
439 | 436 | ||
440 | init_completion(&target->target_wait); | 437 | init_completion(&target->target_wait); |
441 | init_completion(&target->cmd_wait); | 438 | init_completion(&target->cmd_wait); |
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index a8bddd81b4d1..aa15cc4269a1 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c | |||
@@ -347,11 +347,9 @@ static int hfa384x_cmd(struct net_device *dev, u16 cmd, u16 param0, | |||
347 | return -EINTR; | 347 | return -EINTR; |
348 | 348 | ||
349 | entry = kzalloc(sizeof(*entry), GFP_ATOMIC); | 349 | entry = kzalloc(sizeof(*entry), GFP_ATOMIC); |
350 | if (entry == NULL) { | 350 | if (entry == NULL) |
351 | printk(KERN_DEBUG "%s: hfa384x_cmd - kmalloc failed\n", | ||
352 | dev->name); | ||
353 | return -ENOMEM; | 351 | return -ENOMEM; |
354 | } | 352 | |
355 | atomic_set(&entry->usecnt, 1); | 353 | atomic_set(&entry->usecnt, 1); |
356 | entry->type = CMD_SLEEP; | 354 | entry->type = CMD_SLEEP; |
357 | entry->cmd = cmd; | 355 | entry->cmd = cmd; |
@@ -515,11 +513,9 @@ static int hfa384x_cmd_callback(struct net_device *dev, u16 cmd, u16 param0, | |||
515 | } | 513 | } |
516 | 514 | ||
517 | entry = kzalloc(sizeof(*entry), GFP_ATOMIC); | 515 | entry = kzalloc(sizeof(*entry), GFP_ATOMIC); |
518 | if (entry == NULL) { | 516 | if (entry == NULL) |
519 | printk(KERN_DEBUG "%s: hfa384x_cmd_callback - kmalloc " | ||
520 | "failed\n", dev->name); | ||
521 | return -ENOMEM; | 517 | return -ENOMEM; |
522 | } | 518 | |
523 | atomic_set(&entry->usecnt, 1); | 519 | atomic_set(&entry->usecnt, 1); |
524 | entry->type = CMD_CALLBACK; | 520 | entry->type = CMD_CALLBACK; |
525 | entry->cmd = cmd; | 521 | entry->cmd = cmd; |
@@ -2978,11 +2974,9 @@ static int prism2_set_tim(struct net_device *dev, int aid, int set) | |||
2978 | local = iface->local; | 2974 | local = iface->local; |
2979 | 2975 | ||
2980 | new_entry = kzalloc(sizeof(*new_entry), GFP_ATOMIC); | 2976 | new_entry = kzalloc(sizeof(*new_entry), GFP_ATOMIC); |
2981 | if (new_entry == NULL) { | 2977 | if (new_entry == NULL) |
2982 | printk(KERN_DEBUG "%s: prism2_set_tim: kmalloc failed\n", | ||
2983 | local->dev->name); | ||
2984 | return -ENOMEM; | 2978 | return -ENOMEM; |
2985 | } | 2979 | |
2986 | new_entry->aid = aid; | 2980 | new_entry->aid = aid; |
2987 | new_entry->set = set; | 2981 | new_entry->set = set; |
2988 | 2982 | ||
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c index a0e5c21d3657..e847737ccc9d 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c | |||
@@ -3464,11 +3464,8 @@ static int ipw2100_msg_allocate(struct ipw2100_priv *priv) | |||
3464 | priv->msg_buffers = | 3464 | priv->msg_buffers = |
3465 | kmalloc(IPW_COMMAND_POOL_SIZE * sizeof(struct ipw2100_tx_packet), | 3465 | kmalloc(IPW_COMMAND_POOL_SIZE * sizeof(struct ipw2100_tx_packet), |
3466 | GFP_KERNEL); | 3466 | GFP_KERNEL); |
3467 | if (!priv->msg_buffers) { | 3467 | if (!priv->msg_buffers) |
3468 | printk(KERN_ERR DRV_NAME ": %s: PCI alloc failed for msg " | ||
3469 | "buffers.\n", priv->net_dev->name); | ||
3470 | return -ENOMEM; | 3468 | return -ENOMEM; |
3471 | } | ||
3472 | 3469 | ||
3473 | for (i = 0; i < IPW_COMMAND_POOL_SIZE; i++) { | 3470 | for (i = 0; i < IPW_COMMAND_POOL_SIZE; i++) { |
3474 | v = pci_alloc_consistent(priv->pci_dev, | 3471 | v = pci_alloc_consistent(priv->pci_dev, |
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index 3f7bf4d912b6..234ee88dec95 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c | |||
@@ -815,10 +815,9 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
815 | lbs_deb_enter(LBS_DEB_CS); | 815 | lbs_deb_enter(LBS_DEB_CS); |
816 | 816 | ||
817 | card = kzalloc(sizeof(struct if_cs_card), GFP_KERNEL); | 817 | card = kzalloc(sizeof(struct if_cs_card), GFP_KERNEL); |
818 | if (!card) { | 818 | if (!card) |
819 | pr_err("error in kzalloc\n"); | ||
820 | goto out; | 819 | goto out; |
821 | } | 820 | |
822 | card->p_dev = p_dev; | 821 | card->p_dev = p_dev; |
823 | p_dev->priv = card; | 822 | p_dev->priv = card; |
824 | 823 | ||
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index b5fbbc7947df..74da5f1ea243 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c | |||
@@ -261,10 +261,8 @@ static int if_usb_probe(struct usb_interface *intf, | |||
261 | udev = interface_to_usbdev(intf); | 261 | udev = interface_to_usbdev(intf); |
262 | 262 | ||
263 | cardp = kzalloc(sizeof(struct if_usb_card), GFP_KERNEL); | 263 | cardp = kzalloc(sizeof(struct if_usb_card), GFP_KERNEL); |
264 | if (!cardp) { | 264 | if (!cardp) |
265 | pr_err("Out of memory allocating private data\n"); | ||
266 | goto error; | 265 | goto error; |
267 | } | ||
268 | 266 | ||
269 | setup_timer(&cardp->fw_timeout, if_usb_fw_timeo, (unsigned long)cardp); | 267 | setup_timer(&cardp->fw_timeout, if_usb_fw_timeo, (unsigned long)cardp); |
270 | init_waitqueue_head(&cardp->fw_wq); | 268 | init_waitqueue_head(&cardp->fw_wq); |
diff --git a/drivers/net/wireless/libertas_tf/if_usb.c b/drivers/net/wireless/libertas_tf/if_usb.c index aff8b5743af0..7ced130f4f9e 100644 --- a/drivers/net/wireless/libertas_tf/if_usb.c +++ b/drivers/net/wireless/libertas_tf/if_usb.c | |||
@@ -153,10 +153,8 @@ static int if_usb_probe(struct usb_interface *intf, | |||
153 | udev = interface_to_usbdev(intf); | 153 | udev = interface_to_usbdev(intf); |
154 | 154 | ||
155 | cardp = kzalloc(sizeof(struct if_usb_card), GFP_KERNEL); | 155 | cardp = kzalloc(sizeof(struct if_usb_card), GFP_KERNEL); |
156 | if (!cardp) { | 156 | if (!cardp) |
157 | pr_err("Out of memory allocating private data.\n"); | ||
158 | goto error; | 157 | goto error; |
159 | } | ||
160 | 158 | ||
161 | setup_timer(&cardp->fw_timeout, if_usb_fw_timeo, (unsigned long)cardp); | 159 | setup_timer(&cardp->fw_timeout, if_usb_fw_timeo, (unsigned long)cardp); |
162 | init_waitqueue_head(&cardp->fw_wq); | 160 | init_waitqueue_head(&cardp->fw_wq); |
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c index 405350940a45..f4fbad95d3e3 100644 --- a/drivers/net/wireless/mwifiex/pcie.c +++ b/drivers/net/wireless/mwifiex/pcie.c | |||
@@ -86,10 +86,8 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev, | |||
86 | pdev->vendor, pdev->device, pdev->revision); | 86 | pdev->vendor, pdev->device, pdev->revision); |
87 | 87 | ||
88 | card = kzalloc(sizeof(struct pcie_service_card), GFP_KERNEL); | 88 | card = kzalloc(sizeof(struct pcie_service_card), GFP_KERNEL); |
89 | if (!card) { | 89 | if (!card) |
90 | pr_err("%s: failed to alloc memory\n", __func__); | ||
91 | return -ENOMEM; | 90 | return -ENOMEM; |
92 | } | ||
93 | 91 | ||
94 | card->dev = pdev; | 92 | card->dev = pdev; |
95 | 93 | ||
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c index d39d8457f252..835902750231 100644 --- a/drivers/net/wireless/mwifiex/sdio.c +++ b/drivers/net/wireless/mwifiex/sdio.c | |||
@@ -70,10 +70,8 @@ mwifiex_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id) | |||
70 | func->vendor, func->device, func->class, func->num); | 70 | func->vendor, func->device, func->class, func->num); |
71 | 71 | ||
72 | card = kzalloc(sizeof(struct sdio_mmc_card), GFP_KERNEL); | 72 | card = kzalloc(sizeof(struct sdio_mmc_card), GFP_KERNEL); |
73 | if (!card) { | 73 | if (!card) |
74 | pr_err("%s: failed to alloc memory\n", __func__); | ||
75 | return -ENOMEM; | 74 | return -ENOMEM; |
76 | } | ||
77 | 75 | ||
78 | card->func = func; | 76 | card->func = func; |
79 | 77 | ||
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c index 9fb77d0319f5..dd6c64ac406e 100644 --- a/drivers/net/wireless/orinoco/main.c +++ b/drivers/net/wireless/orinoco/main.c | |||
@@ -941,11 +941,9 @@ void __orinoco_ev_rx(struct net_device *dev, struct hermes *hw) | |||
941 | 941 | ||
942 | /* Add desc and skb to rx queue */ | 942 | /* Add desc and skb to rx queue */ |
943 | rx_data = kzalloc(sizeof(*rx_data), GFP_ATOMIC); | 943 | rx_data = kzalloc(sizeof(*rx_data), GFP_ATOMIC); |
944 | if (!rx_data) { | 944 | if (!rx_data) |
945 | printk(KERN_WARNING "%s: Can't allocate RX packet\n", | ||
946 | dev->name); | ||
947 | goto drop; | 945 | goto drop; |
948 | } | 946 | |
949 | rx_data->desc = desc; | 947 | rx_data->desc = desc; |
950 | rx_data->skb = skb; | 948 | rx_data->skb = skb; |
951 | list_add_tail(&rx_data->list, &priv->rx_list); | 949 | list_add_tail(&rx_data->list, &priv->rx_list); |
diff --git a/drivers/net/wireless/prism54/islpci_mgt.c b/drivers/net/wireless/prism54/islpci_mgt.c index a5224f6160e4..851fa10241e1 100644 --- a/drivers/net/wireless/prism54/islpci_mgt.c +++ b/drivers/net/wireless/prism54/islpci_mgt.c | |||
@@ -192,11 +192,9 @@ islpci_mgt_transmit(struct net_device *ndev, int operation, unsigned long oid, | |||
192 | 192 | ||
193 | err = -ENOMEM; | 193 | err = -ENOMEM; |
194 | p = buf.mem = kmalloc(frag_len, GFP_KERNEL); | 194 | p = buf.mem = kmalloc(frag_len, GFP_KERNEL); |
195 | if (!buf.mem) { | 195 | if (!buf.mem) |
196 | printk(KERN_DEBUG "%s: cannot allocate mgmt frame\n", | ||
197 | ndev->name); | ||
198 | goto error; | 196 | goto error; |
199 | } | 197 | |
200 | buf.size = frag_len; | 198 | buf.size = frag_len; |
201 | 199 | ||
202 | /* create the header directly in the fragment data area */ | 200 | /* create the header directly in the fragment data area */ |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c index 78723cf59491..36140ccf2abd 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c | |||
@@ -186,11 +186,8 @@ static int rtl92s_init_sw_vars(struct ieee80211_hw *hw) | |||
186 | 186 | ||
187 | /* for firmware buf */ | 187 | /* for firmware buf */ |
188 | rtlpriv->rtlhal.pfirmware = vzalloc(sizeof(struct rt_firmware)); | 188 | rtlpriv->rtlhal.pfirmware = vzalloc(sizeof(struct rt_firmware)); |
189 | if (!rtlpriv->rtlhal.pfirmware) { | 189 | if (!rtlpriv->rtlhal.pfirmware) |
190 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, | ||
191 | ("Can't alloc buffer for fw.\n")); | ||
192 | return 1; | 190 | return 1; |
193 | } | ||
194 | 191 | ||
195 | pr_info("Driver for Realtek RTL8192SE/RTL8191SE\n" | 192 | pr_info("Driver for Realtek RTL8192SE/RTL8191SE\n" |
196 | "Loading firmware %s\n", rtlpriv->cfg->fw_name); | 193 | "Loading firmware %s\n", rtlpriv->cfg->fw_name); |
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c index 59effac15f36..2596401308a8 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c | |||
@@ -1639,10 +1639,8 @@ static int __init netback_init(void) | |||
1639 | 1639 | ||
1640 | xen_netbk_group_nr = num_online_cpus(); | 1640 | xen_netbk_group_nr = num_online_cpus(); |
1641 | xen_netbk = vzalloc(sizeof(struct xen_netbk) * xen_netbk_group_nr); | 1641 | xen_netbk = vzalloc(sizeof(struct xen_netbk) * xen_netbk_group_nr); |
1642 | if (!xen_netbk) { | 1642 | if (!xen_netbk) |
1643 | printk(KERN_ALERT "%s: out of memory\n", __func__); | ||
1644 | return -ENOMEM; | 1643 | return -ENOMEM; |
1645 | } | ||
1646 | 1644 | ||
1647 | for (group = 0; group < xen_netbk_group_nr; group++) { | 1645 | for (group = 0; group < xen_netbk_group_nr; group++) { |
1648 | struct xen_netbk *netbk = &xen_netbk[group]; | 1646 | struct xen_netbk *netbk = &xen_netbk[group]; |