diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2010-08-17 06:11:24 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-19 00:04:31 -0700 |
commit | cb5d991a99104565f7b622b1b97587f4b1effa82 (patch) | |
tree | 308ab62d0cbe1485a8fb463329ff1c05f808d9fd /drivers/net/greth.c | |
parent | 900853a4db7098b0e58ddcb732632ac43a7b2148 (diff) | |
download | lwn-cb5d991a99104565f7b622b1b97587f4b1effa82.tar.gz lwn-cb5d991a99104565f7b622b1b97587f4b1effa82.zip |
greth: Use return value of register_netdev
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>
Diffstat (limited to 'drivers/net/greth.c')
-rw-r--r-- | drivers/net/greth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/greth.c b/drivers/net/greth.c index f15c64f1cd38..fbeaf70d1727 100644 --- a/drivers/net/greth.c +++ b/drivers/net/greth.c @@ -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; } |