mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	l2tp: unregister l2tp_net_ops on failure path
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
							parent
							
								
									ecf7b361a6
								
							
						
					
					
						commit
						67e04c29ec
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -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;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue