Commit cb5d991a authored by Tobias Klauser's avatar Tobias Klauser Committed by David S. Miller

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: default avatarTobias Klauser <tklauser@distanz.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 900853a4
......@@ -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;
}
......
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