diff options
-rw-r--r-- | net/core/net_namespace.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 69d7549..b7292a2 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c @@ -196,7 +196,6 @@ struct net *copy_net_ns(unsigned long flags, struct net *old_net) static int __init net_ns_init(void) { struct net_generic *ng; - int err; #ifdef CONFIG_NET_NS net_cachep = kmem_cache_create("net_namespace", sizeof(struct net), @@ -216,15 +215,14 @@ static int __init net_ns_init(void) rcu_assign_pointer(init_net.gen, ng); mutex_lock(&net_mutex); - err = setup_net(&init_net); + if (setup_net(&init_net)) + panic("Could not setup the initial network namespace"); rtnl_lock(); list_add_tail(&init_net.list, &net_namespace_list); rtnl_unlock(); mutex_unlock(&net_mutex); - if (err) - panic("Could not setup the initial network namespace"); return 0; } |