diff mbox

[net] l2tp: unregister l2tp_net_ops on failure path

Message ID 1428093969-4224-1-git-send-email-xiyou.wangcong@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Cong Wang April 3, 2015, 8:46 p.m. UTC
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
 net/l2tp/l2tp_core.c | 1 +
 1 file changed, 1 insertion(+)

Comments

David Miller April 6, 2015, 8:53 p.m. UTC | #1
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Fri,  3 Apr 2015 13:46:09 -0700

> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index 895348e..a29a504 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;
 	}