Commit 67e04c29 authored by WANG Cong's avatar WANG Cong Committed by David S. Miller

l2tp: unregister l2tp_net_ops on failure path

Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ecf7b361
...@@ -1871,6 +1871,7 @@ static int __init l2tp_init(void) ...@@ -1871,6 +1871,7 @@ static int __init l2tp_init(void)
l2tp_wq = alloc_workqueue("l2tp", WQ_UNBOUND, 0); l2tp_wq = alloc_workqueue("l2tp", WQ_UNBOUND, 0);
if (!l2tp_wq) { if (!l2tp_wq) {
pr_err("alloc_workqueue failed\n"); pr_err("alloc_workqueue failed\n");
unregister_pernet_device(&l2tp_net_ops);
rc = -ENOMEM; rc = -ENOMEM;
goto out; goto out;
} }
......
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