Commit 46069ed2 authored by Alexander Viro's avatar Alexander Viro Committed by Stephen Hemminger

[netdrvr ariadne] use alloc_etherdev

parent b0cba8a2
...@@ -168,7 +168,7 @@ static int __init ariadne_probe(void) ...@@ -168,7 +168,7 @@ static int __init ariadne_probe(void)
continue; continue;
} }
dev = init_etherdev(NULL, sizeof(struct ariadne_private)); dev = alloc_etherdev(sizeof(struct ariadne_private));
if (dev == NULL) { if (dev == NULL) {
release_resource(r1); release_resource(r1);
...@@ -205,11 +205,17 @@ static int __init ariadne_probe(void) ...@@ -205,11 +205,17 @@ static int __init ariadne_probe(void)
dev->get_stats = &ariadne_get_stats; dev->get_stats = &ariadne_get_stats;
dev->set_multicast_list = &set_multicast_list; dev->set_multicast_list = &set_multicast_list;
res = register_netdev(dev);
if (res) {
release_resource(r1);
release_resource(r2);
free_netdev(dev);
break;
}
#ifdef MODULE #ifdef MODULE
priv->next_module = root_ariadne_dev; priv->next_module = root_ariadne_dev;
root_ariadne_dev = priv; root_ariadne_dev = priv;
#endif #endif
res = 0;
} }
return res; return res;
} }
......
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