mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-03 22:44:27 -05:00 
			
		
		
		
	swconfig: simplify init code
Directly return the return value of genl_register_family_with_ops() instead of storing it in a temporary variable, then returning it. Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 48472
This commit is contained in:
		
							parent
							
								
									38719ecca4
								
							
						
					
					
						commit
						a9b4952be1
					
				@ -1172,14 +1172,9 @@ EXPORT_SYMBOL_GPL(unregister_switch);
 | 
			
		||||
static int __init
 | 
			
		||||
swconfig_init(void)
 | 
			
		||||
{
 | 
			
		||||
	int err;
 | 
			
		||||
 | 
			
		||||
	INIT_LIST_HEAD(&swdevs);
 | 
			
		||||
	
 | 
			
		||||
	err = genl_register_family_with_ops(&switch_fam, swconfig_ops);
 | 
			
		||||
	if (err)
 | 
			
		||||
		return err;
 | 
			
		||||
	return 0;
 | 
			
		||||
	return genl_register_family_with_ops(&switch_fam, swconfig_ops);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void __exit
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user