diff options
author | Joe Perches <joe@perches.com> | 2012-01-29 08:47:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-31 16:20:48 -0500 |
commit | 41de8d4cff21a2e81e3d9ff66f5f7c903f9c3ab1 (patch) | |
tree | c441a6911ff802233473f31fa29a985e690a816a /drivers/net | |
parent | e404decb0fb017be80552adee894b35307b6c7b4 (diff) |
drivers/net: Remove alloc_etherdev error messages
alloc_etherdev has a generic OOM/unable to alloc message.
Remove the duplicative messages after alloc_etherdev calls.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
86 files changed, 63 insertions, 192 deletions
diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c index 8153a3e0a1a4..dc51d9218e6d 100644 --- a/drivers/net/ethernet/3com/3c59x.c +++ b/drivers/net/ethernet/3com/3c59x.c | |||
@@ -1121,10 +1121,9 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1121 | 1121 | ||
1122 | dev = alloc_etherdev(sizeof(*vp)); | 1122 | dev = alloc_etherdev(sizeof(*vp)); |
1123 | retval = -ENOMEM; | 1123 | retval = -ENOMEM; |
1124 | if (!dev) { | 1124 | if (!dev) |
1125 | pr_err(PFX "unable to allocate etherdev, aborting\n"); | ||
1126 | goto out; | 1125 | goto out; |
1127 | } | 1126 | |
1128 | SET_NETDEV_DEV(dev, gendev); | 1127 | SET_NETDEV_DEV(dev, gendev); |
1129 | vp = netdev_priv(dev); | 1128 | vp = netdev_priv(dev); |
1130 | 1129 | ||
diff --git a/drivers/net/ethernet/adaptec/starfire.c b/drivers/net/ethernet/adaptec/starfire.c index cb4f38a17f20..11fc2eccb0fd 100644 --- a/drivers/net/ethernet/adaptec/starfire.c +++ b/drivers/net/ethernet/adaptec/starfire.c | |||
@@ -686,10 +686,9 @@ static int __devinit starfire_init_one(struct pci_dev *pdev, | |||
686 | } | 686 | } |
687 | 687 | ||
688 | dev = alloc_etherdev(sizeof(*np)); | 688 | dev = alloc_etherdev(sizeof(*np)); |
689 | if (!dev) { | 689 | if (!dev) |
690 | printk(KERN_ERR DRV_NAME " %d: cannot alloc etherdev, aborting\n", card_idx); | ||
691 | return -ENOMEM; | 690 | return -ENOMEM; |
692 | } | 691 | |
693 | SET_NETDEV_DEV(dev, &pdev->dev); | 692 | SET_NETDEV_DEV(dev, &pdev->dev); |
694 | 693 | ||
695 | irq = pdev->irq; | 694 | irq = pdev->irq; |
diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c index d812a103e032..525a9768bb54 100644 --- a/drivers/net/ethernet/adi/bfin_mac.c +++ b/drivers/net/ethernet/adi/bfin_mac.c | |||
@@ -1467,10 +1467,8 @@ static int __devinit bfin_mac_probe(struct platform_device *pdev) | |||
1467 | int rc; | 1467 | int rc; |
1468 | 1468 | ||
1469 | ndev = alloc_etherdev(sizeof(struct bfin_mac_local)); | 1469 | ndev = alloc_etherdev(sizeof(struct bfin_mac_local)); |
1470 | if (!ndev) { | 1470 | if (!ndev) |
1471 | dev_err(&pdev->dev, "Cannot allocate net device!\n"); | ||
1472 | return -ENOMEM; | 1471 | return -ENOMEM; |
1473 | } | ||
1474 | 1472 | ||
1475 | SET_NETDEV_DEV(ndev, &pdev->dev); | 1473 | SET_NETDEV_DEV(ndev, &pdev->dev); |
1476 | platform_set_drvdata(pdev, ndev); | 1474 | platform_set_drvdata(pdev, ndev); |
diff --git a/drivers/net/ethernet/alteon/acenic.c b/drivers/net/ethernet/alteon/acenic.c index f872748ab4e6..6c3b1c0adaa0 100644 --- a/drivers/net/ethernet/alteon/acenic.c +++ b/drivers/net/ethernet/alteon/acenic.c | |||
@@ -463,11 +463,8 @@ static int __devinit acenic_probe_one(struct pci_dev *pdev, | |||
463 | static int boards_found; | 463 | static int boards_found; |
464 | 464 | ||
465 | dev = alloc_etherdev(sizeof(struct ace_private)); | 465 | dev = alloc_etherdev(sizeof(struct ace_private)); |
466 | if (dev == NULL) { | 466 | if (dev == NULL) |
467 | printk(KERN_ERR "acenic: Unable to allocate " | ||
468 | "net_device structure!\n"); | ||
469 | return -ENOMEM; | 467 | return -ENOMEM; |
470 | } | ||
471 | 468 | ||
472 | SET_NETDEV_DEV(dev, &pdev->dev); | 469 | SET_NETDEV_DEV(dev, &pdev->dev); |
473 | 470 | ||
diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c index 33e0a8c20f6b..b8306a589558 100644 --- a/drivers/net/ethernet/amd/amd8111e.c +++ b/drivers/net/ethernet/amd/amd8111e.c | |||
@@ -1859,7 +1859,6 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev, | |||
1859 | 1859 | ||
1860 | dev = alloc_etherdev(sizeof(struct amd8111e_priv)); | 1860 | dev = alloc_etherdev(sizeof(struct amd8111e_priv)); |
1861 | if (!dev) { | 1861 | if (!dev) { |
1862 | printk(KERN_ERR "amd8111e: Etherdev alloc failed, exiting.\n"); | ||
1863 | err = -ENOMEM; | 1862 | err = -ENOMEM; |
1864 | goto err_free_reg; | 1863 | goto err_free_reg; |
1865 | } | 1864 | } |
diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c index 8b95dd314253..a81c871aeacf 100644 --- a/drivers/net/ethernet/amd/au1000_eth.c +++ b/drivers/net/ethernet/amd/au1000_eth.c | |||
@@ -1077,7 +1077,6 @@ static int __devinit au1000_probe(struct platform_device *pdev) | |||
1077 | 1077 | ||
1078 | dev = alloc_etherdev(sizeof(struct au1000_private)); | 1078 | dev = alloc_etherdev(sizeof(struct au1000_private)); |
1079 | if (!dev) { | 1079 | if (!dev) { |
1080 | dev_err(&pdev->dev, "alloc_etherdev failed\n"); | ||
1081 | err = -ENOMEM; | 1080 | err = -ENOMEM; |
1082 | goto err_alloc; | 1081 | goto err_alloc; |
1083 | } | 1082 | } |
diff --git a/drivers/net/ethernet/amd/declance.c b/drivers/net/ethernet/amd/declance.c index 73f8d4fa682d..dd82ee2f8d21 100644 --- a/drivers/net/ethernet/amd/declance.c +++ b/drivers/net/ethernet/amd/declance.c | |||
@@ -1052,8 +1052,6 @@ static int __devinit dec_lance_probe(struct device *bdev, const int type) | |||
1052 | 1052 | ||
1053 | dev = alloc_etherdev(sizeof(struct lance_private)); | 1053 | dev = alloc_etherdev(sizeof(struct lance_private)); |
1054 | if (!dev) { | 1054 | if (!dev) { |
1055 | printk(KERN_ERR "%s: Unable to allocate etherdev, aborting.\n", | ||
1056 | name); | ||
1057 | ret = -ENOMEM; | 1055 | ret = -ENOMEM; |
1058 | goto err_out; | 1056 | goto err_out; |
1059 | } | 1057 | } |
diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c index 20e6dab0186c..1bb388f62e5b 100644 --- a/drivers/net/ethernet/amd/pcnet32.c +++ b/drivers/net/ethernet/amd/pcnet32.c | |||
@@ -1649,8 +1649,6 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev) | |||
1649 | 1649 | ||
1650 | dev = alloc_etherdev(sizeof(*lp)); | 1650 | dev = alloc_etherdev(sizeof(*lp)); |
1651 | if (!dev) { | 1651 | if (!dev) { |
1652 | if (pcnet32_debug & NETIF_MSG_PROBE) | ||
1653 | pr_err("Memory allocation failed\n"); | ||
1654 | ret = -ENOMEM; | 1652 | ret = -ENOMEM; |
1655 | goto err_release_region; | 1653 | goto err_release_region; |
1656 | } | 1654 | } |
diff --git a/drivers/net/ethernet/apple/bmac.c b/drivers/net/ethernet/apple/bmac.c index 4108ac800cf0..ebc0dba5ba33 100644 --- a/drivers/net/ethernet/apple/bmac.c +++ b/drivers/net/ethernet/apple/bmac.c | |||
@@ -1269,10 +1269,8 @@ static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_i | |||
1269 | memcpy(addr, prop_addr, sizeof(addr)); | 1269 | memcpy(addr, prop_addr, sizeof(addr)); |
1270 | 1270 | ||
1271 | dev = alloc_etherdev(PRIV_BYTES); | 1271 | dev = alloc_etherdev(PRIV_BYTES); |
1272 | if (!dev) { | 1272 | if (!dev) |
1273 | printk(KERN_ERR "BMAC: alloc_etherdev failed, out of memory\n"); | ||
1274 | return -ENOMEM; | 1273 | return -ENOMEM; |
1275 | } | ||
1276 | 1274 | ||
1277 | bp = netdev_priv(dev); | 1275 | bp = netdev_priv(dev); |
1278 | SET_NETDEV_DEV(dev, &mdev->ofdev.dev); | 1276 | SET_NETDEV_DEV(dev, &mdev->ofdev.dev); |
diff --git a/drivers/net/ethernet/apple/mace.c b/drivers/net/ethernet/apple/mace.c index 45ba18ee3d6a..bd5555dbe027 100644 --- a/drivers/net/ethernet/apple/mace.c +++ b/drivers/net/ethernet/apple/mace.c | |||
@@ -147,7 +147,6 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i | |||
147 | 147 | ||
148 | dev = alloc_etherdev(PRIV_BYTES); | 148 | dev = alloc_etherdev(PRIV_BYTES); |
149 | if (!dev) { | 149 | if (!dev) { |
150 | printk(KERN_ERR "MACE: can't allocate ethernet device !\n"); | ||
151 | rc = -ENOMEM; | 150 | rc = -ENOMEM; |
152 | goto err_release; | 151 | goto err_release; |
153 | } | 152 | } |
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c index b8591246eb4c..7ee4aacb01a4 100644 --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c | |||
@@ -2689,7 +2689,6 @@ static int __devinit atl1c_probe(struct pci_dev *pdev, | |||
2689 | netdev = alloc_etherdev(sizeof(struct atl1c_adapter)); | 2689 | netdev = alloc_etherdev(sizeof(struct atl1c_adapter)); |
2690 | if (netdev == NULL) { | 2690 | if (netdev == NULL) { |
2691 | err = -ENOMEM; | 2691 | err = -ENOMEM; |
2692 | dev_err(&pdev->dev, "etherdev alloc failed\n"); | ||
2693 | goto err_alloc_etherdev; | 2692 | goto err_alloc_etherdev; |
2694 | } | 2693 | } |
2695 | 2694 | ||
diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c index c915c0873810..93ff2b231284 100644 --- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c +++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c | |||
@@ -2300,7 +2300,6 @@ static int __devinit atl1e_probe(struct pci_dev *pdev, | |||
2300 | netdev = alloc_etherdev(sizeof(struct atl1e_adapter)); | 2300 | netdev = alloc_etherdev(sizeof(struct atl1e_adapter)); |
2301 | if (netdev == NULL) { | 2301 | if (netdev == NULL) { |
2302 | err = -ENOMEM; | 2302 | err = -ENOMEM; |
2303 | dev_err(&pdev->dev, "etherdev alloc failed\n"); | ||
2304 | goto err_alloc_etherdev; | 2303 | goto err_alloc_etherdev; |
2305 | } | 2304 | } |
2306 | 2305 | ||
diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c index 3fb66d09ece5..66f53c797e3a 100644 --- a/drivers/net/ethernet/broadcom/b44.c +++ b/drivers/net/ethernet/broadcom/b44.c | |||
@@ -2138,7 +2138,6 @@ static int __devinit b44_init_one(struct ssb_device *sdev, | |||
2138 | 2138 | ||
2139 | dev = alloc_etherdev(sizeof(*bp)); | 2139 | dev = alloc_etherdev(sizeof(*bp)); |
2140 | if (!dev) { | 2140 | if (!dev) { |
2141 | dev_err(sdev->dev, "Etherdev alloc failed, aborting\n"); | ||
2142 | err = -ENOMEM; | 2141 | err = -ENOMEM; |
2143 | goto out; | 2142 | goto out; |
2144 | } | 2143 | } |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 582cbcf5f9fb..ff19c3cf4409 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
@@ -11133,10 +11133,8 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev, | |||
11133 | 11133 | ||
11134 | /* dev zeroed in init_etherdev */ | 11134 | /* dev zeroed in init_etherdev */ |
11135 | dev = alloc_etherdev_mqs(sizeof(*bp), tx_count, rx_count); | 11135 | dev = alloc_etherdev_mqs(sizeof(*bp), tx_count, rx_count); |
11136 | if (!dev) { | 11136 | if (!dev) |
11137 | dev_err(&pdev->dev, "Cannot allocate net device\n"); | ||
11138 | return -ENOMEM; | 11137 | return -ENOMEM; |
11139 | } | ||
11140 | 11138 | ||
11141 | bp = netdev_priv(dev); | 11139 | bp = netdev_priv(dev); |
11142 | 11140 | ||
diff --git a/drivers/net/ethernet/broadcom/sb1250-mac.c b/drivers/net/ethernet/broadcom/sb1250-mac.c index 084904ceaa30..49e7a258da8a 100644 --- a/drivers/net/ethernet/broadcom/sb1250-mac.c +++ b/drivers/net/ethernet/broadcom/sb1250-mac.c | |||
@@ -2623,8 +2623,6 @@ static int __devinit sbmac_probe(struct platform_device *pldev) | |||
2623 | */ | 2623 | */ |
2624 | dev = alloc_etherdev(sizeof(struct sbmac_softc)); | 2624 | dev = alloc_etherdev(sizeof(struct sbmac_softc)); |
2625 | if (!dev) { | 2625 | if (!dev) { |
2626 | printk(KERN_ERR "%s: unable to allocate etherdev\n", | ||
2627 | dev_name(&pldev->dev)); | ||
2628 | err = -ENOMEM; | 2626 | err = -ENOMEM; |
2629 | goto out_unmap; | 2627 | goto out_unmap; |
2630 | } | 2628 | } |
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index a1f2e0fed78b..3bf3adca3695 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c | |||
@@ -15471,7 +15471,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
15471 | 15471 | ||
15472 | dev = alloc_etherdev_mq(sizeof(*tp), TG3_IRQ_MAX_VECS); | 15472 | dev = alloc_etherdev_mq(sizeof(*tp), TG3_IRQ_MAX_VECS); |
15473 | if (!dev) { | 15473 | if (!dev) { |
15474 | dev_err(&pdev->dev, "Etherdev alloc failed, aborting\n"); | ||
15475 | err = -ENOMEM; | 15474 | err = -ENOMEM; |
15476 | goto err_out_power_down; | 15475 | goto err_out_power_down; |
15477 | } | 15476 | } |
diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c index be7d91e4b785..ff78f770dec9 100644 --- a/drivers/net/ethernet/brocade/bna/bnad.c +++ b/drivers/net/ethernet/brocade/bna/bnad.c | |||
@@ -3284,7 +3284,6 @@ bnad_pci_probe(struct pci_dev *pdev, | |||
3284 | */ | 3284 | */ |
3285 | netdev = alloc_etherdev(sizeof(struct bnad)); | 3285 | netdev = alloc_etherdev(sizeof(struct bnad)); |
3286 | if (!netdev) { | 3286 | if (!netdev) { |
3287 | dev_err(&pdev->dev, "netdev allocation failed\n"); | ||
3288 | err = -ENOMEM; | 3287 | err = -ENOMEM; |
3289 | return err; | 3288 | return err; |
3290 | } | 3289 | } |
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index 23200680d4c1..3c315f46859b 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c | |||
@@ -1308,10 +1308,8 @@ static int __init macb_probe(struct platform_device *pdev) | |||
1308 | 1308 | ||
1309 | err = -ENOMEM; | 1309 | err = -ENOMEM; |
1310 | dev = alloc_etherdev(sizeof(*bp)); | 1310 | dev = alloc_etherdev(sizeof(*bp)); |
1311 | if (!dev) { | 1311 | if (!dev) |
1312 | dev_err(&pdev->dev, "etherdev alloc failed, aborting.\n"); | ||
1313 | goto err_out; | 1312 | goto err_out; |
1314 | } | ||
1315 | 1313 | ||
1316 | SET_NETDEV_DEV(dev, &pdev->dev); | 1314 | SET_NETDEV_DEV(dev, &pdev->dev); |
1317 | 1315 | ||
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c index e53365a71484..9045a451d4a9 100644 --- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | |||
@@ -2596,8 +2596,6 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev, | |||
2596 | netdev = alloc_etherdev_mq(sizeof(struct port_info), | 2596 | netdev = alloc_etherdev_mq(sizeof(struct port_info), |
2597 | MAX_PORT_QSETS); | 2597 | MAX_PORT_QSETS); |
2598 | if (netdev == NULL) { | 2598 | if (netdev == NULL) { |
2599 | dev_err(&pdev->dev, "cannot allocate netdev for" | ||
2600 | " port %d\n", port_id); | ||
2601 | t4vf_free_vi(adapter, viid); | 2599 | t4vf_free_vi(adapter, viid); |
2602 | err = -ENOMEM; | 2600 | err = -ENOMEM; |
2603 | goto err_free_dev; | 2601 | goto err_free_dev; |
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c index 07df13745c43..2838891a94ee 100644 --- a/drivers/net/ethernet/cisco/enic/enic_main.c +++ b/drivers/net/ethernet/cisco/enic/enic_main.c | |||
@@ -2280,10 +2280,8 @@ static int __devinit enic_probe(struct pci_dev *pdev, | |||
2280 | */ | 2280 | */ |
2281 | 2281 | ||
2282 | netdev = alloc_etherdev(sizeof(struct enic)); | 2282 | netdev = alloc_etherdev(sizeof(struct enic)); |
2283 | if (!netdev) { | 2283 | if (!netdev) |
2284 | pr_err("Etherdev alloc failed, aborting\n"); | ||
2285 | return -ENOMEM; | 2284 | return -ENOMEM; |
2286 | } | ||
2287 | 2285 | ||
2288 | pci_set_drvdata(pdev, netdev); | 2286 | pci_set_drvdata(pdev, netdev); |
2289 | 2287 | ||
diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c index f801754c71a7..493cc6202081 100644 --- a/drivers/net/ethernet/davicom/dm9000.c +++ b/drivers/net/ethernet/davicom/dm9000.c | |||
@@ -1373,10 +1373,8 @@ dm9000_probe(struct platform_device *pdev) | |||
1373 | 1373 | ||
1374 | /* Init network device */ | 1374 | /* Init network device */ |
1375 | ndev = alloc_etherdev(sizeof(struct board_info)); | 1375 | ndev = alloc_etherdev(sizeof(struct board_info)); |
1376 | if (!ndev) { | 1376 | if (!ndev) |
1377 | dev_err(&pdev->dev, "could not allocate device.\n"); | ||
1378 | return -ENOMEM; | 1377 | return -ENOMEM; |
1379 | } | ||
1380 | 1378 | ||
1381 | SET_NETDEV_DEV(ndev, &pdev->dev); | 1379 | SET_NETDEV_DEV(ndev, &pdev->dev); |
1382 | 1380 | ||
diff --git a/drivers/net/ethernet/dec/tulip/tulip_core.c b/drivers/net/ethernet/dec/tulip/tulip_core.c index 4eb0d76145c2..17ecb18341c9 100644 --- a/drivers/net/ethernet/dec/tulip/tulip_core.c +++ b/drivers/net/ethernet/dec/tulip/tulip_core.c | |||
@@ -1424,10 +1424,8 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, | |||
1424 | 1424 | ||
1425 | /* alloc_etherdev ensures aligned and zeroed private structures */ | 1425 | /* alloc_etherdev ensures aligned and zeroed private structures */ |
1426 | dev = alloc_etherdev (sizeof (*tp)); | 1426 | dev = alloc_etherdev (sizeof (*tp)); |
1427 | if (!dev) { | 1427 | if (!dev) |
1428 | pr_err("ether device alloc failed, aborting\n"); | ||
1429 | return -ENOMEM; | 1428 | return -ENOMEM; |
1430 | } | ||
1431 | 1429 | ||
1432 | SET_NETDEV_DEV(dev, &pdev->dev); | 1430 | SET_NETDEV_DEV(dev, &pdev->dev); |
1433 | if (pci_resource_len (pdev, 0) < tulip_tbl[chip_idx].io_size) { | 1431 | if (pci_resource_len (pdev, 0) < tulip_tbl[chip_idx].io_size) { |
diff --git a/drivers/net/ethernet/dec/tulip/xircom_cb.c b/drivers/net/ethernet/dec/tulip/xircom_cb.c index 988b8eb24d37..b7c73eefb54b 100644 --- a/drivers/net/ethernet/dec/tulip/xircom_cb.c +++ b/drivers/net/ethernet/dec/tulip/xircom_cb.c | |||
@@ -222,10 +222,9 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_ | |||
222 | is available. | 222 | is available. |
223 | */ | 223 | */ |
224 | dev = alloc_etherdev(sizeof(struct xircom_private)); | 224 | dev = alloc_etherdev(sizeof(struct xircom_private)); |
225 | if (!dev) { | 225 | if (!dev) |
226 | pr_err("%s: failed to allocate etherdev\n", __func__); | ||
227 | goto device_fail; | 226 | goto device_fail; |
228 | } | 227 | |
229 | private = netdev_priv(dev); | 228 | private = netdev_priv(dev); |
230 | 229 | ||
231 | /* Allocate the send/receive buffers */ | 230 | /* Allocate the send/receive buffers */ |
diff --git a/drivers/net/ethernet/dnet.c b/drivers/net/ethernet/dnet.c index 925c9bafc9b9..fe48cb7dde21 100644 --- a/drivers/net/ethernet/dnet.c +++ b/drivers/net/ethernet/dnet.c | |||
@@ -854,10 +854,8 @@ static int __devinit dnet_probe(struct platform_device *pdev) | |||
854 | 854 | ||
855 | err = -ENOMEM; | 855 | err = -ENOMEM; |
856 | dev = alloc_etherdev(sizeof(*bp)); | 856 | dev = alloc_etherdev(sizeof(*bp)); |
857 | if (!dev) { | 857 | if (!dev) |
858 | dev_err(&pdev->dev, "etherdev alloc failed, aborting.\n"); | ||
859 | goto err_out_release_mem; | 858 | goto err_out_release_mem; |
860 | } | ||
861 | 859 | ||
862 | /* TODO: Actually, we have some interesting features... */ | 860 | /* TODO: Actually, we have some interesting features... */ |
863 | dev->features |= 0; | 861 | dev->features |= 0; |
diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c index 388c592b5ef5..0b723ff2294b 100644 --- a/drivers/net/ethernet/ethoc.c +++ b/drivers/net/ethernet/ethoc.c | |||
@@ -913,7 +913,6 @@ static int __devinit ethoc_probe(struct platform_device *pdev) | |||
913 | /* allocate networking device */ | 913 | /* allocate networking device */ |
914 | netdev = alloc_etherdev(sizeof(struct ethoc)); | 914 | netdev = alloc_etherdev(sizeof(struct ethoc)); |
915 | if (!netdev) { | 915 | if (!netdev) { |
916 | dev_err(&pdev->dev, "cannot allocate network device\n"); | ||
917 | ret = -ENOMEM; | 916 | ret = -ENOMEM; |
918 | goto out; | 917 | goto out; |
919 | } | 918 | } |
diff --git a/drivers/net/ethernet/hp/hp100.c b/drivers/net/ethernet/hp/hp100.c index 6a5ee0776b28..3598c5408e79 100644 --- a/drivers/net/ethernet/hp/hp100.c +++ b/drivers/net/ethernet/hp/hp100.c | |||
@@ -2992,7 +2992,6 @@ static int __init hp100_isa_init(void) | |||
2992 | for (i = 0; i < HP100_DEVICES && hp100_port[i] != -1; ++i) { | 2992 | for (i = 0; i < HP100_DEVICES && hp100_port[i] != -1; ++i) { |
2993 | dev = alloc_etherdev(sizeof(struct hp100_private)); | 2993 | dev = alloc_etherdev(sizeof(struct hp100_private)); |
2994 | if (!dev) { | 2994 | if (!dev) { |
2995 | printk(KERN_WARNING "hp100: no memory for network device\n"); | ||
2996 | while (cards > 0) | 2995 | while (cards > 0) |
2997 | cleanup_dev(hp100_devlist[--cards]); | 2996 | cleanup_dev(hp100_devlist[--cards]); |
2998 | 2997 | ||
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c index 14507d1e78c5..8b73dd472475 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea_main.c +++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c | |||
@@ -2980,7 +2980,6 @@ static struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter, | |||
2980 | dev = alloc_etherdev_mq(sizeof(struct ehea_port), EHEA_MAX_PORT_RES); | 2980 | dev = alloc_etherdev_mq(sizeof(struct ehea_port), EHEA_MAX_PORT_RES); |
2981 | 2981 | ||
2982 | if (!dev) { | 2982 | if (!dev) { |
2983 | pr_err("no mem for net_device\n"); | ||
2984 | ret = -ENOMEM; | 2983 | ret = -ENOMEM; |
2985 | goto out_err; | 2984 | goto out_err; |
2986 | } | 2985 | } |
diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c index d47c16e02d00..dac7ffb4eaf1 100644 --- a/drivers/net/ethernet/ibm/emac/core.c +++ b/drivers/net/ethernet/ibm/emac/core.c | |||
@@ -2706,11 +2706,9 @@ static int __devinit emac_probe(struct platform_device *ofdev) | |||
2706 | /* Allocate our net_device structure */ | 2706 | /* Allocate our net_device structure */ |
2707 | err = -ENOMEM; | 2707 | err = -ENOMEM; |
2708 | ndev = alloc_etherdev(sizeof(struct emac_instance)); | 2708 | ndev = alloc_etherdev(sizeof(struct emac_instance)); |
2709 | if (!ndev) { | 2709 | if (!ndev) |
2710 | printk(KERN_ERR "%s: could not allocate ethernet device!\n", | ||
2711 | np->full_name); | ||
2712 | goto err_gone; | 2710 | goto err_gone; |
2713 | } | 2711 | |
2714 | dev = netdev_priv(ndev); | 2712 | dev = netdev_priv(ndev); |
2715 | dev->ndev = ndev; | 2713 | dev->ndev = ndev; |
2716 | dev->ofdev = ofdev; | 2714 | dev->ofdev = ofdev; |
diff --git a/drivers/net/ethernet/ibm/iseries_veth.c b/drivers/net/ethernet/ibm/iseries_veth.c index acc31af6594a..1cafa6562a06 100644 --- a/drivers/net/ethernet/ibm/iseries_veth.c +++ b/drivers/net/ethernet/ibm/iseries_veth.c | |||
@@ -1032,10 +1032,8 @@ static struct net_device *veth_probe_one(int vlan, | |||
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | dev = alloc_etherdev(sizeof (struct veth_port)); | 1034 | dev = alloc_etherdev(sizeof (struct veth_port)); |
1035 | if (! dev) { | 1035 | if (!dev) |
1036 | veth_error("Unable to allocate net_device structure!\n"); | ||
1037 | return NULL; | 1036 | return NULL; |
1038 | } | ||
1039 | 1037 | ||
1040 | port = netdev_priv(dev); | 1038 | port = netdev_priv(dev); |
1041 | 1039 | ||
diff --git a/drivers/net/ethernet/icplus/ipg.c b/drivers/net/ethernet/icplus/ipg.c index 075451d0207d..3c636f16a3cb 100644 --- a/drivers/net/ethernet/icplus/ipg.c +++ b/drivers/net/ethernet/icplus/ipg.c | |||
@@ -2233,7 +2233,6 @@ static int __devinit ipg_probe(struct pci_dev *pdev, | |||
2233 | */ | 2233 | */ |
2234 | dev = alloc_etherdev(sizeof(struct ipg_nic_private)); | 2234 | dev = alloc_etherdev(sizeof(struct ipg_nic_private)); |
2235 | if (!dev) { | 2235 | if (!dev) { |
2236 | pr_err("%s: alloc_etherdev failed\n", pci_name(pdev)); | ||
2237 | rc = -ENOMEM; | 2236 | rc = -ENOMEM; |
2238 | goto err_disable_0; | 2237 | goto err_disable_0; |
2239 | } | 2238 | } |
diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c index 9436397e5725..485ab8cdac48 100644 --- a/drivers/net/ethernet/intel/e100.c +++ b/drivers/net/ethernet/intel/e100.c | |||
@@ -2751,11 +2751,8 @@ static int __devinit e100_probe(struct pci_dev *pdev, | |||
2751 | struct nic *nic; | 2751 | struct nic *nic; |
2752 | int err; | 2752 | int err; |
2753 | 2753 | ||
2754 | if (!(netdev = alloc_etherdev(sizeof(struct nic)))) { | 2754 | if (!(netdev = alloc_etherdev(sizeof(struct nic)))) |
2755 | if (((1 << debug) - 1) & NETIF_MSG_PROBE) | ||
2756 | pr_err("Etherdev alloc failed, aborting\n"); | ||
2757 | return -ENOMEM; | 2755 | return -ENOMEM; |
2758 | } | ||
2759 | 2756 | ||
2760 | netdev->netdev_ops = &e100_netdev_ops; | 2757 | netdev->netdev_ops = &e100_netdev_ops; |
2761 | SET_ETHTOOL_OPS(netdev, &e100_ethtool_ops); | 2758 | SET_ETHTOOL_OPS(netdev, &e100_ethtool_ops); |
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c index 27d651a80f3f..1b86d0b45f3c 100644 --- a/drivers/net/ethernet/jme.c +++ b/drivers/net/ethernet/jme.c | |||
@@ -2999,7 +2999,6 @@ jme_init_one(struct pci_dev *pdev, | |||
2999 | */ | 2999 | */ |
3000 | netdev = alloc_etherdev(sizeof(*jme)); | 3000 | netdev = alloc_etherdev(sizeof(*jme)); |
3001 | if (!netdev) { | 3001 | if (!netdev) { |
3002 | pr_err("Cannot allocate netdev structure\n"); | ||
3003 | rc = -ENOMEM; | 3002 | rc = -ENOMEM; |
3004 | goto err_out_release_regions; | 3003 | goto err_out_release_regions; |
3005 | } | 3004 | } |
diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index 341d10130dca..f30db1c46600 100644 --- a/drivers/net/ethernet/korina.c +++ b/drivers/net/ethernet/korina.c | |||
@@ -1108,10 +1108,9 @@ static int korina_probe(struct platform_device *pdev) | |||
1108 | int rc; | 1108 | int rc; |
1109 | 1109 | ||
1110 | dev = alloc_etherdev(sizeof(struct korina_private)); | 1110 | dev = alloc_etherdev(sizeof(struct korina_private)); |
1111 | if (!dev) { | 1111 | if (!dev) |
1112 | printk(KERN_ERR DRV_NAME ": alloc_etherdev failed\n"); | ||
1113 | return -ENOMEM; | 1112 | return -ENOMEM; |
1114 | } | 1113 | |
1115 | SET_NETDEV_DEV(dev, &pdev->dev); | 1114 | SET_NETDEV_DEV(dev, &pdev->dev); |
1116 | lp = netdev_priv(dev); | 1115 | lp = netdev_priv(dev); |
1117 | 1116 | ||
diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c index 85e2c6cd9708..86d2fe6e053d 100644 --- a/drivers/net/ethernet/lantiq_etop.c +++ b/drivers/net/ethernet/lantiq_etop.c | |||
@@ -731,6 +731,10 @@ ltq_etop_probe(struct platform_device *pdev) | |||
731 | } | 731 | } |
732 | 732 | ||
733 | dev = alloc_etherdev_mq(sizeof(struct ltq_etop_priv), 4); | 733 | dev = alloc_etherdev_mq(sizeof(struct ltq_etop_priv), 4); |
734 | if (!dev) { | ||
735 | err = -ENOMEM; | ||
736 | goto err_out; | ||
737 | } | ||
734 | strcpy(dev->name, "eth%d"); | 738 | strcpy(dev->name, "eth%d"); |
735 | dev->netdev_ops = <q_eth_netdev_ops; | 739 | dev->netdev_ops = <q_eth_netdev_ops; |
736 | dev->ethtool_ops = <q_etop_ethtool_ops; | 740 | dev->ethtool_ops = <q_etop_ethtool_ops; |
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c index edb9bda55d55..1d61eaac8587 100644 --- a/drivers/net/ethernet/marvell/skge.c +++ b/drivers/net/ethernet/marvell/skge.c | |||
@@ -3852,10 +3852,8 @@ static struct net_device *skge_devinit(struct skge_hw *hw, int port, | |||
3852 | struct skge_port *skge; | 3852 | struct skge_port *skge; |
3853 | struct net_device *dev = alloc_etherdev(sizeof(*skge)); | 3853 | struct net_device *dev = alloc_etherdev(sizeof(*skge)); |
3854 | 3854 | ||
3855 | if (!dev) { | 3855 | if (!dev) |
3856 | dev_err(&hw->pdev->dev, "etherdev alloc failed\n"); | ||
3857 | return NULL; | 3856 | return NULL; |
3858 | } | ||
3859 | 3857 | ||
3860 | SET_NETDEV_DEV(dev, &hw->pdev->dev); | 3858 | SET_NETDEV_DEV(dev, &hw->pdev->dev); |
3861 | dev->netdev_ops = &skge_netdev_ops; | 3859 | dev->netdev_ops = &skge_netdev_ops; |
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index 760c2b17dfd3..82c2c86a1951 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c | |||
@@ -4700,10 +4700,8 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw, | |||
4700 | struct sky2_port *sky2; | 4700 | struct sky2_port *sky2; |
4701 | struct net_device *dev = alloc_etherdev(sizeof(*sky2)); | 4701 | struct net_device *dev = alloc_etherdev(sizeof(*sky2)); |
4702 | 4702 | ||
4703 | if (!dev) { | 4703 | if (!dev) |
4704 | dev_err(&hw->pdev->dev, "etherdev alloc failed\n"); | ||
4705 | return NULL; | 4704 | return NULL; |
4706 | } | ||
4707 | 4705 | ||
4708 | SET_NETDEV_DEV(dev, &hw->pdev->dev); | 4706 | SET_NETDEV_DEV(dev, &hw->pdev->dev); |
4709 | dev->irq = hw->pdev->irq; | 4707 | dev->irq = hw->pdev->irq; |
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index 467ae5824875..25e6480479df 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c | |||
@@ -1047,10 +1047,8 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, | |||
1047 | 1047 | ||
1048 | dev = alloc_etherdev_mqs(sizeof(struct mlx4_en_priv), | 1048 | dev = alloc_etherdev_mqs(sizeof(struct mlx4_en_priv), |
1049 | prof->tx_ring_num, prof->rx_ring_num); | 1049 | prof->tx_ring_num, prof->rx_ring_num); |
1050 | if (dev == NULL) { | 1050 | if (dev == NULL) |
1051 | mlx4_err(mdev, "Net device allocation failed\n"); | ||
1052 | return -ENOMEM; | 1051 | return -ENOMEM; |
1053 | } | ||
1054 | 1052 | ||
1055 | SET_NETDEV_DEV(dev, &mdev->dev->pdev->dev); | 1053 | SET_NETDEV_DEV(dev, &mdev->dev->pdev->dev); |
1056 | dev->dev_id = port - 1; | 1054 | dev->dev_id = port - 1; |
diff --git a/drivers/net/ethernet/micrel/ks8695net.c b/drivers/net/ethernet/micrel/ks8695net.c index ab81c0dc96e2..7c717276502f 100644 --- a/drivers/net/ethernet/micrel/ks8695net.c +++ b/drivers/net/ethernet/micrel/ks8695net.c | |||
@@ -1362,10 +1362,8 @@ ks8695_probe(struct platform_device *pdev) | |||
1362 | 1362 | ||
1363 | /* Initialise a net_device */ | 1363 | /* Initialise a net_device */ |
1364 | ndev = alloc_etherdev(sizeof(struct ks8695_priv)); | 1364 | ndev = alloc_etherdev(sizeof(struct ks8695_priv)); |
1365 | if (!ndev) { | 1365 | if (!ndev) |
1366 | dev_err(&pdev->dev, "could not allocate device.\n"); | ||
1367 | return -ENOMEM; | 1366 | return -ENOMEM; |
1368 | } | ||
1369 | 1367 | ||
1370 | SET_NETDEV_DEV(ndev, &pdev->dev); | 1368 | SET_NETDEV_DEV(ndev, &pdev->dev); |
1371 | 1369 | ||
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c index 134c4d07936b..4b551feae4c5 100644 --- a/drivers/net/ethernet/micrel/ks8851.c +++ b/drivers/net/ethernet/micrel/ks8851.c | |||
@@ -1419,10 +1419,8 @@ static int __devinit ks8851_probe(struct spi_device *spi) | |||
1419 | int ret; | 1419 | int ret; |
1420 | 1420 | ||
1421 | ndev = alloc_etherdev(sizeof(struct ks8851_net)); | 1421 | ndev = alloc_etherdev(sizeof(struct ks8851_net)); |
1422 | if (!ndev) { | 1422 | if (!ndev) |
1423 | dev_err(&spi->dev, "failed to alloc ethernet device\n"); | ||
1424 | return -ENOMEM; | 1423 | return -ENOMEM; |
1425 | } | ||
1426 | 1424 | ||
1427 | spi->bits_per_word = 8; | 1425 | spi->bits_per_word = 8; |
1428 | 1426 | ||
diff --git a/drivers/net/ethernet/microchip/enc28j60.c b/drivers/net/ethernet/microchip/enc28j60.c index 50055e0282ed..c813e5d8db9d 100644 --- a/drivers/net/ethernet/microchip/enc28j60.c +++ b/drivers/net/ethernet/microchip/enc28j60.c | |||
@@ -1553,9 +1553,6 @@ static int __devinit enc28j60_probe(struct spi_device *spi) | |||
1553 | 1553 | ||
1554 | dev = alloc_etherdev(sizeof(struct enc28j60_net)); | 1554 | dev = alloc_etherdev(sizeof(struct enc28j60_net)); |
1555 | if (!dev) { | 1555 | if (!dev) { |
1556 | if (netif_msg_drv(&debug)) | ||
1557 | dev_err(&spi->dev, DRV_NAME | ||
1558 | ": unable to alloc new ethernet\n"); | ||
1559 | ret = -ENOMEM; | 1556 | ret = -ENOMEM; |
1560 | goto error_alloc; | 1557 | goto error_alloc; |
1561 | } | 1558 | } |
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c index 20b72ecb020a..27273ae1a6e6 100644 --- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c +++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c | |||
@@ -3910,10 +3910,8 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3910 | static int board_number; | 3910 | static int board_number; |
3911 | 3911 | ||
3912 | netdev = alloc_etherdev_mq(sizeof(*mgp), MYRI10GE_MAX_SLICES); | 3912 | netdev = alloc_etherdev_mq(sizeof(*mgp), MYRI10GE_MAX_SLICES); |
3913 | if (netdev == NULL) { | 3913 | if (netdev == NULL) |
3914 | dev_err(dev, "Could not allocate ethernet device\n"); | ||
3915 | return -ENOMEM; | 3914 | return -ENOMEM; |
3916 | } | ||
3917 | 3915 | ||
3918 | SET_NETDEV_DEV(netdev, &pdev->dev); | 3916 | SET_NETDEV_DEV(netdev, &pdev->dev); |
3919 | 3917 | ||
diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c index 97f63e12d86e..138584608809 100644 --- a/drivers/net/ethernet/neterion/s2io.c +++ b/drivers/net/ethernet/neterion/s2io.c | |||
@@ -7760,7 +7760,6 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) | |||
7760 | else | 7760 | else |
7761 | dev = alloc_etherdev(sizeof(struct s2io_nic)); | 7761 | dev = alloc_etherdev(sizeof(struct s2io_nic)); |
7762 | if (dev == NULL) { | 7762 | if (dev == NULL) { |
7763 | DBG_PRINT(ERR_DBG, "Device allocation failed\n"); | ||
7764 | pci_disable_device(pdev); | 7763 | pci_disable_device(pdev); |
7765 | pci_release_regions(pdev); | 7764 | pci_release_regions(pdev); |
7766 | return -ENODEV; | 7765 | return -ENODEV; |
diff --git a/drivers/net/ethernet/netx-eth.c b/drivers/net/ethernet/netx-eth.c index a18bb10b4f0c..5a12276f810d 100644 --- a/drivers/net/ethernet/netx-eth.c +++ b/drivers/net/ethernet/netx-eth.c | |||
@@ -383,7 +383,6 @@ static int netx_eth_drv_probe(struct platform_device *pdev) | |||
383 | 383 | ||
384 | ndev = alloc_etherdev(sizeof (struct netx_eth_priv)); | 384 | ndev = alloc_etherdev(sizeof (struct netx_eth_priv)); |
385 | if (!ndev) { | 385 | if (!ndev) { |
386 | printk("%s: could not allocate device.\n", CARDNAME); | ||
387 | ret = -ENOMEM; | 386 | ret = -ENOMEM; |
388 | goto exit; | 387 | goto exit; |
389 | } | 388 | } |
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 0217991fede7..bdbec7e04a4c 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 | |||
@@ -2419,8 +2419,6 @@ static int pch_gbe_probe(struct pci_dev *pdev, | |||
2419 | netdev = alloc_etherdev((int)sizeof(struct pch_gbe_adapter)); | 2419 | netdev = alloc_etherdev((int)sizeof(struct pch_gbe_adapter)); |
2420 | if (!netdev) { | 2420 | if (!netdev) { |
2421 | ret = -ENOMEM; | 2421 | ret = -ENOMEM; |
2422 | dev_err(&pdev->dev, | ||
2423 | "ERR: Can't allocate and set up an Ethernet device\n"); | ||
2424 | goto err_release_pci; | 2422 | goto err_release_pci; |
2425 | } | 2423 | } |
2426 | SET_NETDEV_DEV(netdev, &pdev->dev); | 2424 | SET_NETDEV_DEV(netdev, &pdev->dev); |
diff --git a/drivers/net/ethernet/packetengines/yellowfin.c b/drivers/net/ethernet/packetengines/yellowfin.c index db44e9af03c3..4a5774271bd4 100644 --- a/drivers/net/ethernet/packetengines/yellowfin.c +++ b/drivers/net/ethernet/packetengines/yellowfin.c | |||
@@ -397,10 +397,9 @@ static int __devinit yellowfin_init_one(struct pci_dev *pdev, | |||
397 | if (i) return i; | 397 | if (i) return i; |
398 | 398 | ||
399 | dev = alloc_etherdev(sizeof(*np)); | 399 | dev = alloc_etherdev(sizeof(*np)); |
400 | if (!dev) { | 400 | if (!dev) |
401 | pr_err("cannot allocate ethernet device\n"); | ||
402 | return -ENOMEM; | 401 | return -ENOMEM; |
403 | } | 402 | |
404 | SET_NETDEV_DEV(dev, &pdev->dev); | 403 | SET_NETDEV_DEV(dev, &pdev->dev); |
405 | 404 | ||
406 | np = netdev_priv(dev); | 405 | np = netdev_priv(dev); |
diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c index 49b549ff2c78..3bb725ed2703 100644 --- a/drivers/net/ethernet/pasemi/pasemi_mac.c +++ b/drivers/net/ethernet/pasemi/pasemi_mac.c | |||
@@ -1740,8 +1740,6 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1740 | 1740 | ||
1741 | dev = alloc_etherdev(sizeof(struct pasemi_mac)); | 1741 | dev = alloc_etherdev(sizeof(struct pasemi_mac)); |
1742 | if (dev == NULL) { | 1742 | if (dev == NULL) { |
1743 | dev_err(&pdev->dev, | ||
1744 | "pasemi_mac: Could not allocate ethernet device.\n"); | ||
1745 | err = -ENOMEM; | 1743 | err = -ENOMEM; |
1746 | goto out_disable_device; | 1744 | goto out_disable_device; |
1747 | } | 1745 | } |
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c index 7dd9a4b107e6..64aa44d5dabb 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | |||
@@ -1403,7 +1403,6 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1403 | 1403 | ||
1404 | netdev = alloc_etherdev(sizeof(struct netxen_adapter)); | 1404 | netdev = alloc_etherdev(sizeof(struct netxen_adapter)); |
1405 | if(!netdev) { | 1405 | if(!netdev) { |
1406 | dev_err(&pdev->dev, "failed to allocate net_device\n"); | ||
1407 | err = -ENOMEM; | 1406 | err = -ENOMEM; |
1408 | goto err_out_free_res; | 1407 | goto err_out_free_res; |
1409 | } | 1408 | } |
diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/net/ethernet/qlogic/qla3xxx.c index 7931531c3a40..d49f6dac51fd 100644 --- a/drivers/net/ethernet/qlogic/qla3xxx.c +++ b/drivers/net/ethernet/qlogic/qla3xxx.c | |||
@@ -3805,7 +3805,6 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev, | |||
3805 | 3805 | ||
3806 | ndev = alloc_etherdev(sizeof(struct ql3_adapter)); | 3806 | ndev = alloc_etherdev(sizeof(struct ql3_adapter)); |
3807 | if (!ndev) { | 3807 | if (!ndev) { |
3808 | pr_err("%s could not alloc etherdev\n", pci_name(pdev)); | ||
3809 | err = -ENOMEM; | 3808 | err = -ENOMEM; |
3810 | goto err_out_free_regions; | 3809 | goto err_out_free_regions; |
3811 | } | 3810 | } |
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index 69b8e4ef14d9..7bfdf57f4b76 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | |||
@@ -1576,7 +1576,6 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1576 | 1576 | ||
1577 | netdev = alloc_etherdev(sizeof(struct qlcnic_adapter)); | 1577 | netdev = alloc_etherdev(sizeof(struct qlcnic_adapter)); |
1578 | if (!netdev) { | 1578 | if (!netdev) { |
1579 | dev_err(&pdev->dev, "failed to allocate net_device\n"); | ||
1580 | err = -ENOMEM; | 1579 | err = -ENOMEM; |
1581 | goto err_out_free_res; | 1580 | goto err_out_free_res; |
1582 | } | 1581 | } |
diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c index cb0eca807852..76cab284876b 100644 --- a/drivers/net/ethernet/rdc/r6040.c +++ b/drivers/net/ethernet/rdc/r6040.c | |||
@@ -1107,7 +1107,6 @@ static int __devinit r6040_init_one(struct pci_dev *pdev, | |||
1107 | 1107 | ||
1108 | dev = alloc_etherdev(sizeof(struct r6040_private)); | 1108 | dev = alloc_etherdev(sizeof(struct r6040_private)); |
1109 | if (!dev) { | 1109 | if (!dev) { |
1110 | dev_err(&pdev->dev, "Failed to allocate etherdev\n"); | ||
1111 | err = -ENOMEM; | 1110 | err = -ENOMEM; |
1112 | goto err_out; | 1111 | goto err_out; |
1113 | } | 1112 | } |
diff --git a/drivers/net/ethernet/realtek/8139too.c b/drivers/net/ethernet/realtek/8139too.c index a8779bedb3d9..1c3feb0116b5 100644 --- a/drivers/net/ethernet/realtek/8139too.c +++ b/drivers/net/ethernet/realtek/8139too.c | |||
@@ -754,10 +754,9 @@ static __devinit struct net_device * rtl8139_init_board (struct pci_dev *pdev) | |||
754 | 754 | ||
755 | /* dev and priv zeroed in alloc_etherdev */ | 755 | /* dev and priv zeroed in alloc_etherdev */ |
756 | dev = alloc_etherdev (sizeof (*tp)); | 756 | dev = alloc_etherdev (sizeof (*tp)); |
757 | if (dev == NULL) { | 757 | if (dev == NULL) |
758 | dev_err(&pdev->dev, "Unable to alloc new net device\n"); | ||
759 | return ERR_PTR(-ENOMEM); | 758 | return ERR_PTR(-ENOMEM); |
760 | } | 759 | |
761 | SET_NETDEV_DEV(dev, &pdev->dev); | 760 | SET_NETDEV_DEV(dev, &pdev->dev); |
762 | 761 | ||
763 | tp = netdev_priv(dev); | 762 | tp = netdev_priv(dev); |
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 707742207c75..5eb6858ed0a7 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c | |||
@@ -4008,8 +4008,6 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
4008 | 4008 | ||
4009 | dev = alloc_etherdev(sizeof (*tp)); | 4009 | dev = alloc_etherdev(sizeof (*tp)); |
4010 | if (!dev) { | 4010 | if (!dev) { |
4011 | if (netif_msg_drv(&debug)) | ||
4012 | dev_err(&pdev->dev, "unable to alloc new ethernet\n"); | ||
4013 | rc = -ENOMEM; | 4011 | rc = -ENOMEM; |
4014 | goto out; | 4012 | goto out; |
4015 | } | 4013 | } |
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index 813d41c4a845..1cb5a34d5779 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c | |||
@@ -1792,7 +1792,6 @@ static int sh_eth_drv_probe(struct platform_device *pdev) | |||
1792 | 1792 | ||
1793 | ndev = alloc_etherdev(sizeof(struct sh_eth_private)); | 1793 | ndev = alloc_etherdev(sizeof(struct sh_eth_private)); |
1794 | if (!ndev) { | 1794 | if (!ndev) { |
1795 | dev_err(&pdev->dev, "Could not allocate device.\n"); | ||
1796 | ret = -ENOMEM; | 1795 | ret = -ENOMEM; |
1797 | goto out; | 1796 | goto out; |
1798 | } | 1797 | } |
diff --git a/drivers/net/ethernet/s6gmac.c b/drivers/net/ethernet/s6gmac.c index 22e9c0181ce8..bee97033167d 100644 --- a/drivers/net/ethernet/s6gmac.c +++ b/drivers/net/ethernet/s6gmac.c | |||
@@ -960,11 +960,11 @@ static int __devinit s6gmac_probe(struct platform_device *pdev) | |||
960 | int res; | 960 | int res; |
961 | unsigned long i; | 961 | unsigned long i; |
962 | struct mii_bus *mb; | 962 | struct mii_bus *mb; |
963 | |||
963 | dev = alloc_etherdev(sizeof(*pd)); | 964 | dev = alloc_etherdev(sizeof(*pd)); |
964 | if (!dev) { | 965 | if (!dev) |
965 | printk(KERN_ERR DRV_PRMT "etherdev alloc failed, aborting.\n"); | ||
966 | return -ENOMEM; | 966 | return -ENOMEM; |
967 | } | 967 | |
968 | dev->open = s6gmac_open; | 968 | dev->open = s6gmac_open; |
969 | dev->stop = s6gmac_stop; | 969 | dev->stop = s6gmac_stop; |
970 | dev->hard_start_xmit = s6gmac_tx; | 970 | dev->hard_start_xmit = s6gmac_tx; |
diff --git a/drivers/net/ethernet/seeq/sgiseeq.c b/drivers/net/ethernet/seeq/sgiseeq.c index f955a19eb22f..bb8c8222122b 100644 --- a/drivers/net/ethernet/seeq/sgiseeq.c +++ b/drivers/net/ethernet/seeq/sgiseeq.c | |||
@@ -733,7 +733,6 @@ static int __devinit sgiseeq_probe(struct platform_device *pdev) | |||
733 | 733 | ||
734 | dev = alloc_etherdev(sizeof (struct sgiseeq_private)); | 734 | dev = alloc_etherdev(sizeof (struct sgiseeq_private)); |
735 | if (!dev) { | 735 | if (!dev) { |
736 | printk(KERN_ERR "Sgiseeq: Etherdev alloc failed, aborting.\n"); | ||
737 | err = -ENOMEM; | 736 | err = -ENOMEM; |
738 | goto err_out; | 737 | goto err_out; |
739 | } | 738 | } |
diff --git a/drivers/net/ethernet/sis/sis190.c b/drivers/net/ethernet/sis/sis190.c index 5b118cd5bf94..a9deda8eaf63 100644 --- a/drivers/net/ethernet/sis/sis190.c +++ b/drivers/net/ethernet/sis/sis190.c | |||
@@ -1462,8 +1462,6 @@ static struct net_device * __devinit sis190_init_board(struct pci_dev *pdev) | |||
1462 | 1462 | ||
1463 | dev = alloc_etherdev(sizeof(*tp)); | 1463 | dev = alloc_etherdev(sizeof(*tp)); |
1464 | if (!dev) { | 1464 | if (!dev) { |
1465 | if (netif_msg_drv(&debug)) | ||
1466 | pr_err("unable to alloc new ethernet\n"); | ||
1467 | rc = -ENOMEM; | 1465 | rc = -ENOMEM; |
1468 | goto err_out_0; | 1466 | goto err_out_0; |
1469 | } | 1467 | } |
diff --git a/drivers/net/ethernet/smsc/epic100.c b/drivers/net/ethernet/smsc/epic100.c index 2c077ce0b6d6..11dcb38b99f7 100644 --- a/drivers/net/ethernet/smsc/epic100.c +++ b/drivers/net/ethernet/smsc/epic100.c | |||
@@ -363,10 +363,9 @@ static int __devinit epic_init_one (struct pci_dev *pdev, | |||
363 | ret = -ENOMEM; | 363 | ret = -ENOMEM; |
364 | 364 | ||
365 | dev = alloc_etherdev(sizeof (*ep)); | 365 | dev = alloc_etherdev(sizeof (*ep)); |
366 | if (!dev) { | 366 | if (!dev) |
367 | dev_err(&pdev->dev, "no memory for eth device\n"); | ||
368 | goto err_out_free_res; | 367 | goto err_out_free_res; |
369 | } | 368 | |
370 | SET_NETDEV_DEV(dev, &pdev->dev); | 369 | SET_NETDEV_DEV(dev, &pdev->dev); |
371 | 370 | ||
372 | #ifdef USE_IO_OPS | 371 | #ifdef USE_IO_OPS |
diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c index 313ba3b32ab4..c28230148efd 100644 --- a/drivers/net/ethernet/smsc/smc911x.c +++ b/drivers/net/ethernet/smsc/smc911x.c | |||
@@ -2065,7 +2065,6 @@ static int __devinit smc911x_drv_probe(struct platform_device *pdev) | |||
2065 | 2065 | ||
2066 | ndev = alloc_etherdev(sizeof(struct smc911x_local)); | 2066 | ndev = alloc_etherdev(sizeof(struct smc911x_local)); |
2067 | if (!ndev) { | 2067 | if (!ndev) { |
2068 | printk("%s: could not allocate device.\n", CARDNAME); | ||
2069 | ret = -ENOMEM; | 2068 | ret = -ENOMEM; |
2070 | goto release_1; | 2069 | goto release_1; |
2071 | } | 2070 | } |
diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c index 64ad3ed74495..24104a1ee6a5 100644 --- a/drivers/net/ethernet/smsc/smc91x.c +++ b/drivers/net/ethernet/smsc/smc91x.c | |||
@@ -2223,7 +2223,6 @@ static int __devinit smc_drv_probe(struct platform_device *pdev) | |||
2223 | 2223 | ||
2224 | ndev = alloc_etherdev(sizeof(struct smc_local)); | 2224 | ndev = alloc_etherdev(sizeof(struct smc_local)); |
2225 | if (!ndev) { | 2225 | if (!ndev) { |
2226 | printk("%s: could not allocate device.\n", CARDNAME); | ||
2227 | ret = -ENOMEM; | 2226 | ret = -ENOMEM; |
2228 | goto out; | 2227 | goto out; |
2229 | } | 2228 | } |
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index 24d2df068d71..6a1cd2360818 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c | |||
@@ -2374,7 +2374,6 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) | |||
2374 | 2374 | ||
2375 | dev = alloc_etherdev(sizeof(struct smsc911x_data)); | 2375 | dev = alloc_etherdev(sizeof(struct smsc911x_data)); |
2376 | if (!dev) { | 2376 | if (!dev) { |
2377 | pr_warn("Could not allocate device\n"); | ||
2378 | retval = -ENOMEM; | 2377 | retval = -ENOMEM; |
2379 | goto out_release_io_1; | 2378 | goto out_release_io_1; |
2380 | } | 2379 | } |
diff --git a/drivers/net/ethernet/smsc/smsc9420.c b/drivers/net/ethernet/smsc/smsc9420.c index a9efbdfe5302..595f9881e096 100644 --- a/drivers/net/ethernet/smsc/smsc9420.c +++ b/drivers/net/ethernet/smsc/smsc9420.c | |||
@@ -1598,10 +1598,8 @@ smsc9420_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1598 | pci_set_master(pdev); | 1598 | pci_set_master(pdev); |
1599 | 1599 | ||
1600 | dev = alloc_etherdev(sizeof(*pd)); | 1600 | dev = alloc_etherdev(sizeof(*pd)); |
1601 | if (!dev) { | 1601 | if (!dev) |
1602 | printk(KERN_ERR "ether device alloc failed\n"); | ||
1603 | goto out_disable_pci_device_1; | 1602 | goto out_disable_pci_device_1; |
1604 | } | ||
1605 | 1603 | ||
1606 | SET_NETDEV_DEV(dev, &pdev->dev); | 1604 | SET_NETDEV_DEV(dev, &pdev->dev); |
1607 | 1605 | ||
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index ffc7581879b1..166fc95e5baf 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
@@ -1801,10 +1801,8 @@ struct stmmac_priv *stmmac_dvr_probe(struct device *device, | |||
1801 | struct stmmac_priv *priv; | 1801 | struct stmmac_priv *priv; |
1802 | 1802 | ||
1803 | ndev = alloc_etherdev(sizeof(struct stmmac_priv)); | 1803 | ndev = alloc_etherdev(sizeof(struct stmmac_priv)); |
1804 | if (!ndev) { | 1804 | if (!ndev) |
1805 | pr_err("%s: ERROR: allocating the device\n", __func__); | ||
1806 | return NULL; | 1805 | return NULL; |
1807 | } | ||
1808 | 1806 | ||
1809 | SET_NETDEV_DEV(ndev, device); | 1807 | SET_NETDEV_DEV(ndev, device); |
1810 | 1808 | ||
diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c index 46d84abe553d..45292760fce4 100644 --- a/drivers/net/ethernet/sun/cassini.c +++ b/drivers/net/ethernet/sun/cassini.c | |||
@@ -4946,7 +4946,6 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
4946 | 4946 | ||
4947 | dev = alloc_etherdev(sizeof(*cp)); | 4947 | dev = alloc_etherdev(sizeof(*cp)); |
4948 | if (!dev) { | 4948 | if (!dev) { |
4949 | dev_err(&pdev->dev, "Etherdev alloc failed, aborting\n"); | ||
4950 | err = -ENOMEM; | 4949 | err = -ENOMEM; |
4951 | goto err_out_disable_pdev; | 4950 | goto err_out_disable_pdev; |
4952 | } | 4951 | } |
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c index cf433931304f..d83c50816714 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c | |||
@@ -9685,10 +9685,8 @@ static struct net_device * __devinit niu_alloc_and_init( | |||
9685 | struct niu *np; | 9685 | struct niu *np; |
9686 | 9686 | ||
9687 | dev = alloc_etherdev_mq(sizeof(struct niu), NIU_NUM_TXCHAN); | 9687 | dev = alloc_etherdev_mq(sizeof(struct niu), NIU_NUM_TXCHAN); |
9688 | if (!dev) { | 9688 | if (!dev) |
9689 | dev_err(gen_dev, "Etherdev alloc failed, aborting\n"); | ||
9690 | return NULL; | 9689 | return NULL; |
9691 | } | ||
9692 | 9690 | ||
9693 | SET_NETDEV_DEV(dev, gen_dev); | 9691 | SET_NETDEV_DEV(dev, gen_dev); |
9694 | 9692 | ||
diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/ethernet/sun/sungem.c index 31441a870b0b..ba041596e046 100644 --- a/drivers/net/ethernet/sun/sungem.c +++ b/drivers/net/ethernet/sun/sungem.c | |||
@@ -2885,7 +2885,6 @@ static int __devinit gem_init_one(struct pci_dev *pdev, | |||
2885 | 2885 | ||
2886 | dev = alloc_etherdev(sizeof(*gp)); | 2886 | dev = alloc_etherdev(sizeof(*gp)); |
2887 | if (!dev) { | 2887 | if (!dev) { |
2888 | pr_err("Etherdev alloc failed, aborting\n"); | ||
2889 | err = -ENOMEM; | 2888 | err = -ENOMEM; |
2890 | goto err_disable_device; | 2889 | goto err_disable_device; |
2891 | } | 2890 | } |
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c index 2896f6e9672b..92a037a8228a 100644 --- a/drivers/net/ethernet/sun/sunvnet.c +++ b/drivers/net/ethernet/sun/sunvnet.c | |||
@@ -1026,10 +1026,8 @@ static struct vnet * __devinit vnet_new(const u64 *local_mac) | |||
1026 | int err, i; | 1026 | int err, i; |
1027 | 1027 | ||
1028 | dev = alloc_etherdev(sizeof(*vp)); | 1028 | dev = alloc_etherdev(sizeof(*vp)); |
1029 | if (!dev) { | 1029 | if (!dev) |
1030 | pr_err("Etherdev alloc failed, aborting\n"); | ||
1031 | return ERR_PTR(-ENOMEM); | 1030 | return ERR_PTR(-ENOMEM); |
1032 | } | ||
1033 | 1031 | ||
1034 | for (i = 0; i < ETH_ALEN; i++) | 1032 | for (i = 0; i < ETH_ALEN; i++) |
1035 | dev->dev_addr[i] = (*local_mac >> (5 - i) * 8) & 0xff; | 1033 | dev->dev_addr[i] = (*local_mac >> (5 - i) * 8) & 0xff; |
diff --git a/drivers/net/ethernet/tehuti/tehuti.c b/drivers/net/ethernet/tehuti/tehuti.c index 4b19e9b0606b..df7febba9ea6 100644 --- a/drivers/net/ethernet/tehuti/tehuti.c +++ b/drivers/net/ethernet/tehuti/tehuti.c | |||
@@ -1978,7 +1978,6 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1978 | ndev = alloc_etherdev(sizeof(struct bdx_priv)); | 1978 | ndev = alloc_etherdev(sizeof(struct bdx_priv)); |
1979 | if (!ndev) { | 1979 | if (!ndev) { |
1980 | err = -ENOMEM; | 1980 | err = -ENOMEM; |
1981 | pr_err("alloc_etherdev failed\n"); | ||
1982 | goto err_out_iomap; | 1981 | goto err_out_iomap; |
1983 | } | 1982 | } |
1984 | 1983 | ||
diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c index 4d9a28ffd3c3..97e1df330a17 100644 --- a/drivers/net/ethernet/ti/cpmac.c +++ b/drivers/net/ethernet/ti/cpmac.c | |||
@@ -1143,11 +1143,8 @@ static int __devinit cpmac_probe(struct platform_device *pdev) | |||
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | dev = alloc_etherdev_mq(sizeof(*priv), CPMAC_QUEUES); | 1145 | dev = alloc_etherdev_mq(sizeof(*priv), CPMAC_QUEUES); |
1146 | 1146 | if (!dev) | |
1147 | if (!dev) { | ||
1148 | printk(KERN_ERR "cpmac: Unable to allocate net_device\n"); | ||
1149 | return -ENOMEM; | 1147 | return -ENOMEM; |
1150 | } | ||
1151 | 1148 | ||
1152 | platform_set_drvdata(pdev, dev); | 1149 | platform_set_drvdata(pdev, dev); |
1153 | priv = netdev_priv(dev); | 1150 | priv = netdev_priv(dev); |
diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c index 794ac30a577b..efd4f3ee1a2c 100644 --- a/drivers/net/ethernet/ti/davinci_emac.c +++ b/drivers/net/ethernet/ti/davinci_emac.c | |||
@@ -1789,7 +1789,6 @@ static int __devinit davinci_emac_probe(struct platform_device *pdev) | |||
1789 | 1789 | ||
1790 | ndev = alloc_etherdev(sizeof(struct emac_priv)); | 1790 | ndev = alloc_etherdev(sizeof(struct emac_priv)); |
1791 | if (!ndev) { | 1791 | if (!ndev) { |
1792 | dev_err(&pdev->dev, "error allocating net_device\n"); | ||
1793 | rc = -ENOMEM; | 1792 | rc = -ENOMEM; |
1794 | goto free_clk; | 1793 | goto free_clk; |
1795 | } | 1794 | } |
diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c index 9c0dd6b8d6c9..817ad3bc4957 100644 --- a/drivers/net/ethernet/ti/tlan.c +++ b/drivers/net/ethernet/ti/tlan.c | |||
@@ -486,7 +486,6 @@ static int __devinit tlan_probe1(struct pci_dev *pdev, | |||
486 | 486 | ||
487 | dev = alloc_etherdev(sizeof(struct tlan_priv)); | 487 | dev = alloc_etherdev(sizeof(struct tlan_priv)); |
488 | if (dev == NULL) { | 488 | if (dev == NULL) { |
489 | pr_err("Could not allocate memory for device\n"); | ||
490 | rc = -ENOMEM; | 489 | rc = -ENOMEM; |
491 | goto err_out_regions; | 490 | goto err_out_regions; |
492 | } | 491 | } |
diff --git a/drivers/net/ethernet/toshiba/tc35815.c b/drivers/net/ethernet/toshiba/tc35815.c index 71b785cd7563..f5ac603d5608 100644 --- a/drivers/net/ethernet/toshiba/tc35815.c +++ b/drivers/net/ethernet/toshiba/tc35815.c | |||
@@ -808,10 +808,9 @@ static int __devinit tc35815_init_one(struct pci_dev *pdev, | |||
808 | 808 | ||
809 | /* dev zeroed in alloc_etherdev */ | 809 | /* dev zeroed in alloc_etherdev */ |
810 | dev = alloc_etherdev(sizeof(*lp)); | 810 | dev = alloc_etherdev(sizeof(*lp)); |
811 | if (dev == NULL) { | 811 | if (dev == NULL) |
812 | dev_err(&pdev->dev, "unable to alloc new ethernet\n"); | ||
813 | return -ENOMEM; | 812 | return -ENOMEM; |
814 | } | 813 | |
815 | SET_NETDEV_DEV(dev, &pdev->dev); | 814 | SET_NETDEV_DEV(dev, &pdev->dev); |
816 | lp = netdev_priv(dev); | 815 | lp = netdev_priv(dev); |
817 | lp->dev = dev; | 816 | lp->dev = dev; |
diff --git a/drivers/net/ethernet/tundra/tsi108_eth.c b/drivers/net/ethernet/tundra/tsi108_eth.c index 164fb775d7b3..fc5521c9c089 100644 --- a/drivers/net/ethernet/tundra/tsi108_eth.c +++ b/drivers/net/ethernet/tundra/tsi108_eth.c | |||
@@ -1582,10 +1582,8 @@ tsi108_init_one(struct platform_device *pdev) | |||
1582 | /* Create an ethernet device instance */ | 1582 | /* Create an ethernet device instance */ |
1583 | 1583 | ||
1584 | dev = alloc_etherdev(sizeof(struct tsi108_prv_data)); | 1584 | dev = alloc_etherdev(sizeof(struct tsi108_prv_data)); |
1585 | if (!dev) { | 1585 | if (!dev) |
1586 | printk("tsi108_eth: Could not allocate a device structure\n"); | ||
1587 | return -ENOMEM; | 1586 | return -ENOMEM; |
1588 | } | ||
1589 | 1587 | ||
1590 | printk("tsi108_eth%d: probe...\n", pdev->id); | 1588 | printk("tsi108_eth%d: probe...\n", pdev->id); |
1591 | data = netdev_priv(dev); | 1589 | data = netdev_priv(dev); |
diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c index 10b18eb63d25..1b95daa372c4 100644 --- a/drivers/net/ethernet/via/via-rhine.c +++ b/drivers/net/ethernet/via/via-rhine.c | |||
@@ -927,7 +927,6 @@ static int __devinit rhine_init_one(struct pci_dev *pdev, | |||
927 | dev = alloc_etherdev(sizeof(struct rhine_private)); | 927 | dev = alloc_etherdev(sizeof(struct rhine_private)); |
928 | if (!dev) { | 928 | if (!dev) { |
929 | rc = -ENOMEM; | 929 | rc = -ENOMEM; |
930 | dev_err(&pdev->dev, "alloc_etherdev failed\n"); | ||
931 | goto err_out; | 930 | goto err_out; |
932 | } | 931 | } |
933 | SET_NETDEV_DEV(dev, &pdev->dev); | 932 | SET_NETDEV_DEV(dev, &pdev->dev); |
diff --git a/drivers/net/ethernet/via/via-velocity.c b/drivers/net/ethernet/via/via-velocity.c index 4128d6b8cc28..2776bbc67936 100644 --- a/drivers/net/ethernet/via/via-velocity.c +++ b/drivers/net/ethernet/via/via-velocity.c | |||
@@ -2733,10 +2733,8 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi | |||
2733 | } | 2733 | } |
2734 | 2734 | ||
2735 | dev = alloc_etherdev(sizeof(struct velocity_info)); | 2735 | dev = alloc_etherdev(sizeof(struct velocity_info)); |
2736 | if (!dev) { | 2736 | if (!dev) |
2737 | dev_err(&pdev->dev, "allocate net device failed.\n"); | ||
2738 | goto out; | 2737 | goto out; |
2739 | } | ||
2740 | 2738 | ||
2741 | /* Chain it all together */ | 2739 | /* Chain it all together */ |
2742 | 2740 | ||
diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c index f21addb1db95..d8eb9c9e3ee2 100644 --- a/drivers/net/ethernet/xilinx/ll_temac_main.c +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c | |||
@@ -1011,10 +1011,9 @@ static int __devinit temac_of_probe(struct platform_device *op) | |||
1011 | 1011 | ||
1012 | /* Init network device structure */ | 1012 | /* Init network device structure */ |
1013 | ndev = alloc_etherdev(sizeof(*lp)); | 1013 | ndev = alloc_etherdev(sizeof(*lp)); |
1014 | if (!ndev) { | 1014 | if (!ndev) |
1015 | dev_err(&op->dev, "could not allocate device.\n"); | ||
1016 | return -ENOMEM; | 1015 | return -ENOMEM; |
1017 | } | 1016 | |
1018 | ether_setup(ndev); | 1017 | ether_setup(ndev); |
1019 | dev_set_drvdata(&op->dev, ndev); | 1018 | dev_set_drvdata(&op->dev, ndev); |
1020 | SET_NETDEV_DEV(ndev, &op->dev); | 1019 | SET_NETDEV_DEV(ndev, &op->dev); |
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index ea50caf8925b..a7cf00438a36 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c | |||
@@ -1486,10 +1486,8 @@ static int __devinit axienet_of_probe(struct platform_device *op) | |||
1486 | const void *addr; | 1486 | const void *addr; |
1487 | 1487 | ||
1488 | ndev = alloc_etherdev(sizeof(*lp)); | 1488 | ndev = alloc_etherdev(sizeof(*lp)); |
1489 | if (!ndev) { | 1489 | if (!ndev) |
1490 | dev_err(&op->dev, "could not allocate device.\n"); | ||
1491 | return -ENOMEM; | 1490 | return -ENOMEM; |
1492 | } | ||
1493 | 1491 | ||
1494 | ether_setup(ndev); | 1492 | ether_setup(ndev); |
1495 | dev_set_drvdata(&op->dev, ndev); | 1493 | dev_set_drvdata(&op->dev, ndev); |
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c index 79013e5731a5..90e611a6f6c6 100644 --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c | |||
@@ -1136,10 +1136,8 @@ static int __devinit xemaclite_of_probe(struct platform_device *ofdev) | |||
1136 | 1136 | ||
1137 | /* Create an ethernet device instance */ | 1137 | /* Create an ethernet device instance */ |
1138 | ndev = alloc_etherdev(sizeof(struct net_local)); | 1138 | ndev = alloc_etherdev(sizeof(struct net_local)); |
1139 | if (!ndev) { | 1139 | if (!ndev) |
1140 | dev_err(dev, "Could not allocate network device\n"); | ||
1141 | return -ENOMEM; | 1140 | return -ENOMEM; |
1142 | } | ||
1143 | 1141 | ||
1144 | dev_set_drvdata(dev, ndev); | 1142 | dev_set_drvdata(dev, ndev); |
1145 | SET_NETDEV_DEV(ndev, &ofdev->dev); | 1143 | SET_NETDEV_DEV(ndev, &ofdev->dev); |
diff --git a/drivers/net/plip/plip.c b/drivers/net/plip/plip.c index a9e9ca8a86ed..1a5a316cc968 100644 --- a/drivers/net/plip/plip.c +++ b/drivers/net/plip/plip.c | |||
@@ -1260,10 +1260,8 @@ static void plip_attach (struct parport *port) | |||
1260 | 1260 | ||
1261 | sprintf(name, "plip%d", unit); | 1261 | sprintf(name, "plip%d", unit); |
1262 | dev = alloc_etherdev(sizeof(struct net_local)); | 1262 | dev = alloc_etherdev(sizeof(struct net_local)); |
1263 | if (!dev) { | 1263 | if (!dev) |
1264 | printk(KERN_ERR "plip: memory squeeze\n"); | ||
1265 | return; | 1264 | return; |
1266 | } | ||
1267 | 1265 | ||
1268 | strcpy(dev->name, name); | 1266 | strcpy(dev->name, name); |
1269 | 1267 | ||
diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c index 7145714a5ec9..a57f05726b57 100644 --- a/drivers/net/rionet.c +++ b/drivers/net/rionet.c | |||
@@ -497,8 +497,6 @@ static int rionet_probe(struct rio_dev *rdev, const struct rio_device_id *id) | |||
497 | /* Allocate our net_device structure */ | 497 | /* Allocate our net_device structure */ |
498 | ndev = alloc_etherdev(sizeof(struct rionet_private)); | 498 | ndev = alloc_etherdev(sizeof(struct rionet_private)); |
499 | if (ndev == NULL) { | 499 | if (ndev == NULL) { |
500 | printk(KERN_INFO "%s: could not allocate ethernet device.\n", | ||
501 | DRV_NAME); | ||
502 | rc = -ENOMEM; | 500 | rc = -ENOMEM; |
503 | goto out; | 501 | goto out; |
504 | } | 502 | } |
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index 5d99b8cacd7d..752393092325 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c | |||
@@ -1332,10 +1332,8 @@ static int pegasus_probe(struct usb_interface *intf, | |||
1332 | usb_get_dev(dev); | 1332 | usb_get_dev(dev); |
1333 | 1333 | ||
1334 | net = alloc_etherdev(sizeof(struct pegasus)); | 1334 | net = alloc_etherdev(sizeof(struct pegasus)); |
1335 | if (!net) { | 1335 | if (!net) |
1336 | dev_err(&intf->dev, "can't allocate %s\n", "device"); | ||
1337 | goto out; | 1336 | goto out; |
1338 | } | ||
1339 | 1337 | ||
1340 | pegasus = netdev_priv(net); | 1338 | pegasus = netdev_priv(net); |
1341 | pegasus->dev_index = dev_index; | 1339 | pegasus->dev_index = dev_index; |
diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c index 0710b4ca9252..6dda2fe5b15b 100644 --- a/drivers/net/usb/rtl8150.c +++ b/drivers/net/usb/rtl8150.c | |||
@@ -894,10 +894,8 @@ static int rtl8150_probe(struct usb_interface *intf, | |||
894 | struct net_device *netdev; | 894 | struct net_device *netdev; |
895 | 895 | ||
896 | netdev = alloc_etherdev(sizeof(rtl8150_t)); | 896 | netdev = alloc_etherdev(sizeof(rtl8150_t)); |
897 | if (!netdev) { | 897 | if (!netdev) |
898 | err("Out of memory"); | ||
899 | return -ENOMEM; | 898 | return -ENOMEM; |
900 | } | ||
901 | 899 | ||
902 | dev = netdev_priv(netdev); | 900 | dev = netdev_priv(netdev); |
903 | 901 | ||
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index fae0fbd8bc88..b924f46c963c 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -1334,10 +1334,8 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) | |||
1334 | 1334 | ||
1335 | // set up our own records | 1335 | // set up our own records |
1336 | net = alloc_etherdev(sizeof(*dev)); | 1336 | net = alloc_etherdev(sizeof(*dev)); |
1337 | if (!net) { | 1337 | if (!net) |
1338 | dbg ("can't kmalloc dev"); | ||
1339 | goto out; | 1338 | goto out; |
1340 | } | ||
1341 | 1339 | ||
1342 | /* netdev_printk() needs this so do it as early as possible */ | 1340 | /* netdev_printk() needs this so do it as early as possible */ |
1343 | SET_NETDEV_DEV(net, &udev->dev); | 1341 | SET_NETDEV_DEV(net, &udev->dev); |
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 87c0b586f11f..482cfa891f89 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
@@ -2918,11 +2918,8 @@ vmxnet3_probe_device(struct pci_dev *pdev, | |||
2918 | printk(KERN_INFO "# of Tx queues : %d, # of Rx queues : %d\n", | 2918 | printk(KERN_INFO "# of Tx queues : %d, # of Rx queues : %d\n", |
2919 | num_tx_queues, num_rx_queues); | 2919 | num_tx_queues, num_rx_queues); |
2920 | 2920 | ||
2921 | if (!netdev) { | 2921 | if (!netdev) |
2922 | printk(KERN_ERR "Failed to alloc ethernet device for adapter " | ||
2923 | "%s\n", pci_name(pdev)); | ||
2924 | return -ENOMEM; | 2922 | return -ENOMEM; |
2925 | } | ||
2926 | 2923 | ||
2927 | pci_set_drvdata(pdev, netdev); | 2924 | pci_set_drvdata(pdev, netdev); |
2928 | adapter = netdev_priv(netdev); | 2925 | adapter = netdev_priv(netdev); |
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 7e45ca2e78ef..3010cee7b95a 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c | |||
@@ -1533,10 +1533,9 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port, | |||
1533 | 1533 | ||
1534 | /* Create the network device object. */ | 1534 | /* Create the network device object. */ |
1535 | dev = alloc_etherdev(sizeof(*priv)); | 1535 | dev = alloc_etherdev(sizeof(*priv)); |
1536 | if (!dev) { | 1536 | if (!dev) |
1537 | printk(KERN_ERR "atmel: Couldn't alloc_etherdev\n"); | ||
1538 | return NULL; | 1537 | return NULL; |
1539 | } | 1538 | |
1540 | if (dev_alloc_name(dev, dev->name) < 0) { | 1539 | if (dev_alloc_name(dev, dev->name) < 0) { |
1541 | printk(KERN_ERR "atmel: Couldn't get name!\n"); | 1540 | printk(KERN_ERR "atmel: Couldn't get name!\n"); |
1542 | goto err_out_free; | 1541 | goto err_out_free; |
diff --git a/drivers/net/wireless/ipw2x00/libipw_module.c b/drivers/net/wireless/ipw2x00/libipw_module.c index d5ef696298ee..3adb24021a28 100644 --- a/drivers/net/wireless/ipw2x00/libipw_module.c +++ b/drivers/net/wireless/ipw2x00/libipw_module.c | |||
@@ -150,10 +150,9 @@ struct net_device *alloc_libipw(int sizeof_priv, int monitor) | |||
150 | LIBIPW_DEBUG_INFO("Initializing...\n"); | 150 | LIBIPW_DEBUG_INFO("Initializing...\n"); |
151 | 151 | ||
152 | dev = alloc_etherdev(sizeof(struct libipw_device) + sizeof_priv); | 152 | dev = alloc_etherdev(sizeof(struct libipw_device) + sizeof_priv); |
153 | if (!dev) { | 153 | if (!dev) |
154 | LIBIPW_ERROR("Unable to allocate network device.\n"); | ||
155 | goto failed; | 154 | goto failed; |
156 | } | 155 | |
157 | ieee = netdev_priv(dev); | 156 | ieee = netdev_priv(dev); |
158 | 157 | ||
159 | ieee->dev = dev; | 158 | ieee->dev = dev; |
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index db638b4454e3..168102e6ff6e 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c | |||
@@ -1279,11 +1279,8 @@ static struct net_device * __devinit xennet_create_dev(struct xenbus_device *dev | |||
1279 | struct netfront_info *np; | 1279 | struct netfront_info *np; |
1280 | 1280 | ||
1281 | netdev = alloc_etherdev(sizeof(struct netfront_info)); | 1281 | netdev = alloc_etherdev(sizeof(struct netfront_info)); |
1282 | if (!netdev) { | 1282 | if (!netdev) |
1283 | printk(KERN_WARNING "%s> alloc_etherdev failed.\n", | ||
1284 | __func__); | ||
1285 | return ERR_PTR(-ENOMEM); | 1283 | return ERR_PTR(-ENOMEM); |
1286 | } | ||
1287 | 1284 | ||
1288 | np = netdev_priv(netdev); | 1285 | np = netdev_priv(netdev); |
1289 | np->xbdev = dev; | 1286 | np->xbdev = dev; |