Commit 3e554df4 authored by Michal Ludvig's avatar Michal Ludvig Committed by David S. Miller

[IPV4]: Fix GRE tunnel device init.

parent 6e05ae23
...@@ -271,13 +271,17 @@ static struct ip_tunnel * ipgre_tunnel_locate(struct ip_tunnel_parm *parms, int ...@@ -271,13 +271,17 @@ static struct ip_tunnel * ipgre_tunnel_locate(struct ip_tunnel_parm *parms, int
} }
dev = alloc_netdev(sizeof(*t), name, ipgre_tunnel_setup); dev = alloc_netdev(sizeof(*t), name, ipgre_tunnel_setup);
if (!dev)
return NULL;
dev->init = ipgre_tunnel_init;
if (register_netdevice(dev) < 0) { if (register_netdevice(dev) < 0) {
kfree(dev); kfree(dev);
goto failed; goto failed;
} }
nt = dev->priv; nt = dev->priv;
dev->init = ipgre_tunnel_init;
nt->parms = *parms; nt->parms = *parms;
dev_hold(dev); dev_hold(dev);
......
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