Commit 41de8d4c authored by Joe Perches's avatar Joe Perches Committed by David S. Miller
Browse files

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e404decb
......@@ -1121,10 +1121,9 @@ static int __devinit vortex_probe1(struct device *gendev,
dev = alloc_etherdev(sizeof(*vp));
retval = -ENOMEM;
if (!dev) {
pr_err(PFX "unable to allocate etherdev, aborting\n");
if (!dev)
goto out;
}
SET_NETDEV_DEV(dev, gendev);
vp = netdev_priv(dev);
......
......@@ -686,10 +686,9 @@ static int __devinit starfire_init_one(struct pci_dev *pdev,
}
dev = alloc_etherdev(sizeof(*np));
if (!dev) {
printk(KERN_ERR DRV_NAME " %d: cannot alloc etherdev, aborting\n", card_idx);
if (!dev)
return -ENOMEM;
}
SET_NETDEV_DEV(dev, &pdev->dev);
irq = pdev->irq;
......
......@@ -1467,10 +1467,8 @@ static int __devinit bfin_mac_probe(struct platform_device *pdev)
int rc;
ndev = alloc_etherdev(sizeof(struct bfin_mac_local));
if (!ndev) {
dev_err(&pdev->dev, "Cannot allocate net device!\n");
if (!ndev)
return -ENOMEM;
}
SET_NETDEV_DEV(ndev, &pdev->dev);
platform_set_drvdata(pdev, ndev);
......
......@@ -463,11 +463,8 @@ static int __devinit acenic_probe_one(struct pci_dev *pdev,
static int boards_found;
dev = alloc_etherdev(sizeof(struct ace_private));
if (dev == NULL) {
printk(KERN_ERR "acenic: Unable to allocate "
"net_device structure!\n");
if (dev == NULL)
return -ENOMEM;
}
SET_NETDEV_DEV(dev, &pdev->dev);
......
......@@ -1859,7 +1859,6 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
dev = alloc_etherdev(sizeof(struct amd8111e_priv));
if (!dev) {
printk(KERN_ERR "amd8111e: Etherdev alloc failed, exiting.\n");
err = -ENOMEM;
goto err_free_reg;
}
......
......@@ -1077,7 +1077,6 @@ static int __devinit au1000_probe(struct platform_device *pdev)
dev = alloc_etherdev(sizeof(struct au1000_private));
if (!dev) {
dev_err(&pdev->dev, "alloc_etherdev failed\n");
err = -ENOMEM;
goto err_alloc;
}
......
......@@ -1052,8 +1052,6 @@ static int __devinit dec_lance_probe(struct device *bdev, const int type)
dev = alloc_etherdev(sizeof(struct lance_private));
if (!dev) {
printk(KERN_ERR "%s: Unable to allocate etherdev, aborting.\n",
name);
ret = -ENOMEM;
goto err_out;
}
......
......@@ -1649,8 +1649,6 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
dev = alloc_etherdev(sizeof(*lp));
if (!dev) {
if (pcnet32_debug & NETIF_MSG_PROBE)
pr_err("Memory allocation failed\n");
ret = -ENOMEM;
goto err_release_region;
}
......
......@@ -1269,10 +1269,8 @@ static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_i
memcpy(addr, prop_addr, sizeof(addr));
dev = alloc_etherdev(PRIV_BYTES);
if (!dev) {
printk(KERN_ERR "BMAC: alloc_etherdev failed, out of memory\n");
if (!dev)
return -ENOMEM;
}
bp = netdev_priv(dev);
SET_NETDEV_DEV(dev, &mdev->ofdev.dev);
......
......@@ -147,7 +147,6 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i
dev = alloc_etherdev(PRIV_BYTES);
if (!dev) {
printk(KERN_ERR "MACE: can't allocate ethernet device !\n");
rc = -ENOMEM;
goto err_release;
}
......
......@@ -2689,7 +2689,6 @@ static int __devinit atl1c_probe(struct pci_dev *pdev,
netdev = alloc_etherdev(sizeof(struct atl1c_adapter));
if (netdev == NULL) {
err = -ENOMEM;
dev_err(&pdev->dev, "etherdev alloc failed\n");
goto err_alloc_etherdev;
}
......
......@@ -2300,7 +2300,6 @@ static int __devinit atl1e_probe(struct pci_dev *pdev,
netdev = alloc_etherdev(sizeof(struct atl1e_adapter));
if (netdev == NULL) {
err = -ENOMEM;
dev_err(&pdev->dev, "etherdev alloc failed\n");
goto err_alloc_etherdev;
}
......
......@@ -2138,7 +2138,6 @@ static int __devinit b44_init_one(struct ssb_device *sdev,
dev = alloc_etherdev(sizeof(*bp));
if (!dev) {
dev_err(sdev->dev, "Etherdev alloc failed, aborting\n");
err = -ENOMEM;
goto out;
}
......
......@@ -11133,10 +11133,8 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
/* dev zeroed in init_etherdev */
dev = alloc_etherdev_mqs(sizeof(*bp), tx_count, rx_count);
if (!dev) {
dev_err(&pdev->dev, "Cannot allocate net device\n");
if (!dev)
return -ENOMEM;
}
bp = netdev_priv(dev);
......
......@@ -2623,8 +2623,6 @@ static int __devinit sbmac_probe(struct platform_device *pldev)
*/
dev = alloc_etherdev(sizeof(struct sbmac_softc));
if (!dev) {
printk(KERN_ERR "%s: unable to allocate etherdev\n",
dev_name(&pldev->dev));
err = -ENOMEM;
goto out_unmap;
}
......
......@@ -15471,7 +15471,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
dev = alloc_etherdev_mq(sizeof(*tp), TG3_IRQ_MAX_VECS);
if (!dev) {
dev_err(&pdev->dev, "Etherdev alloc failed, aborting\n");
err = -ENOMEM;
goto err_out_power_down;
}
......
......@@ -3284,7 +3284,6 @@ bnad_pci_probe(struct pci_dev *pdev,
*/
netdev = alloc_etherdev(sizeof(struct bnad));
if (!netdev) {
dev_err(&pdev->dev, "netdev allocation failed\n");
err = -ENOMEM;
return err;
}
......
......@@ -1308,10 +1308,8 @@ static int __init macb_probe(struct platform_device *pdev)
err = -ENOMEM;
dev = alloc_etherdev(sizeof(*bp));
if (!dev) {
dev_err(&pdev->dev, "etherdev alloc failed, aborting.\n");
if (!dev)
goto err_out;
}
SET_NETDEV_DEV(dev, &pdev->dev);
......
......@@ -2596,8 +2596,6 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev,
netdev = alloc_etherdev_mq(sizeof(struct port_info),
MAX_PORT_QSETS);
if (netdev == NULL) {
dev_err(&pdev->dev, "cannot allocate netdev for"
" port %d\n", port_id);
t4vf_free_vi(adapter, viid);
err = -ENOMEM;
goto err_free_dev;
......
......@@ -2280,10 +2280,8 @@ static int __devinit enic_probe(struct pci_dev *pdev,
*/
netdev = alloc_etherdev(sizeof(struct enic));
if (!netdev) {
pr_err("Etherdev alloc failed, aborting\n");
if (!netdev)
return -ENOMEM;
}
pci_set_drvdata(pdev, netdev);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment