Skip to content

Commit

Permalink
l2tp: unregister l2tp_net_ops on failure path
Browse files Browse the repository at this point in the history
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
congwang authored and davem330 committed Apr 6, 2015
1 parent ecf7b36 commit 67e04c2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/l2tp/l2tp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 67e04c2

Please sign in to comment.