]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
l2tp: unregister l2tp_net_ops on failure path
authorWANG Cong <xiyou.wangcong@gmail.com>
Fri, 3 Apr 2015 20:46:09 +0000 (13:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Apr 2015 20:53:02 +0000 (16:53 -0400)
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_core.c

index 895348e44c7d22c9e6d4828195e7099a74154531..a29a504492af6f2c38607f2c15e123a297d565cd 100644 (file)
@@ -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;
        }