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>
This commit is contained in:

zatwierdzone przez
David S. Miller

rodzic
e404decb0f
commit
41de8d4cff
@@ -1011,10 +1011,9 @@ static int __devinit temac_of_probe(struct platform_device *op)
|
||||
|
||||
/* Init network device structure */
|
||||
ndev = alloc_etherdev(sizeof(*lp));
|
||||
if (!ndev) {
|
||||
dev_err(&op->dev, "could not allocate device.\n");
|
||||
if (!ndev)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ether_setup(ndev);
|
||||
dev_set_drvdata(&op->dev, ndev);
|
||||
SET_NETDEV_DEV(ndev, &op->dev);
|
||||
|
@@ -1486,10 +1486,8 @@ static int __devinit axienet_of_probe(struct platform_device *op)
|
||||
const void *addr;
|
||||
|
||||
ndev = alloc_etherdev(sizeof(*lp));
|
||||
if (!ndev) {
|
||||
dev_err(&op->dev, "could not allocate device.\n");
|
||||
if (!ndev)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ether_setup(ndev);
|
||||
dev_set_drvdata(&op->dev, ndev);
|
||||
|
@@ -1136,10 +1136,8 @@ static int __devinit xemaclite_of_probe(struct platform_device *ofdev)
|
||||
|
||||
/* Create an ethernet device instance */
|
||||
ndev = alloc_etherdev(sizeof(struct net_local));
|
||||
if (!ndev) {
|
||||
dev_err(dev, "Could not allocate network device\n");
|
||||
if (!ndev)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
dev_set_drvdata(dev, ndev);
|
||||
SET_NETDEV_DEV(ndev, &ofdev->dev);
|
||||
|
Reference in New Issue
Block a user