summaryrefslogtreecommitdiffstats
path: root/net/l2tp/l2tp_core.c
diff options
context:
space:
mode:
authorWANG Cong2015-04-03 22:46:09 +0200
committerDavid S. Miller2015-04-06 22:53:02 +0200
commit67e04c29ec0daad9ba29341b4dab4b89526994cf (patch)
treeb4072c91b462b9621717bac31c4da0f499baea2a /net/l2tp/l2tp_core.c
parentmvneta: dont call mvneta_adjust_link() manually (diff)
downloadkernel-qcow2-linux-67e04c29ec0daad9ba29341b4dab4b89526994cf.tar.gz
kernel-qcow2-linux-67e04c29ec0daad9ba29341b4dab4b89526994cf.tar.xz
kernel-qcow2-linux-67e04c29ec0daad9ba29341b4dab4b89526994cf.zip
l2tp: unregister l2tp_net_ops on failure path
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp/l2tp_core.c')
-rw-r--r--net/l2tp/l2tp_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index 895348e44c7d..a29a504492af 100644
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -1871,6 +1871,7 @@ static int __init l2tp_init(void)
l2tp_wq = alloc_workqueue("l2tp", WQ_UNBOUND, 0);
if (!l2tp_wq) {
pr_err("alloc_workqueue failed\n");
+ unregister_pernet_device(&l2tp_net_ops);
rc = -ENOMEM;
goto out;
}