Skip to content

Commit

Permalink
greth: Use return value of register_netdev
Browse files Browse the repository at this point in the history
Use the return value provided by register_netdev on error instead of
hard setting it to -ENOMEM.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tobias Klauser authored and David S. Miller committed Aug 19, 2010
1 parent 900853a commit cb5d991
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/greth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1547,10 +1547,10 @@ static int __devinit greth_of_probe(struct platform_device *ofdev, const struct
dev->netdev_ops = &greth_netdev_ops;
dev->ethtool_ops = &greth_ethtool_ops;

if (register_netdev(dev)) {
err = register_netdev(dev);
if (err) {
if (netif_msg_probe(greth))
dev_err(greth->dev, "netdevice registration failed.\n");
err = -ENOMEM;
goto error5;
}

Expand Down

0 comments on commit cb5d991

Please sign in to comment.