summaryrefslogtreecommitdiffstats
path: root/net/l2tp
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2015-04-03 13:46:09 -0700
committerDavid S. Miller <davem@davemloft.net>2015-04-06 16:53:02 -0400
commit67e04c29ec0daad9ba29341b4dab4b89526994cf (patch)
treeb4072c91b462b9621717bac31c4da0f499baea2a /net/l2tp
parentecf7b361a6bc1fd5441e4d6a3d7433abbe577064 (diff)
downloadlinux-stable-67e04c29ec0daad9ba29341b4dab4b89526994cf.tar.gz
linux-stable-67e04c29ec0daad9ba29341b4dab4b89526994cf.tar.bz2
linux-stable-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')
-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;
}