Skip to contentSkip to conversation

l2tp: unregister l2tp_net_ops on failure path

PATCH Applied Cong Wang 2 participants 2 messages Apr 3, 2015 – Apr 6, 2015

Subsystems (2)
lore
Share & tools
lore

Cong Wang

author
#0 lore raw

PATCH 1/1 l2tp: unregister l2tp_net_ops on failure path

---
 net/l2tp/l2tp_core.c | 1 +
 1 file changed, 1 insertion(+)
net/l2tp/l2tp_core.c +1 -0
index 895348e..a29a504 100644
@@ -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;
 	}
Signature · 1 line
1.8.3.1