mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	macintosh/ams: Remove unneeded result variable
Return the value from i2c_add_driver() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Signed-off-by: CGEL ZTE <cgel.zte@gmail.com> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220118075252.925616-1-chi.minghao@zte.com.cn
This commit is contained in:
		
							parent
							
								
									9d021a2149
								
							
						
					
					
						commit
						e9bb94cde1
					
				
					 1 changed files with 1 additions and 5 deletions
				
			
		|  | @ -256,8 +256,6 @@ static void ams_i2c_exit(void) | ||||||
| 
 | 
 | ||||||
| int __init ams_i2c_init(struct device_node *np) | int __init ams_i2c_init(struct device_node *np) | ||||||
| { | { | ||||||
| 	int result; |  | ||||||
| 
 |  | ||||||
| 	/* Set implementation stuff */ | 	/* Set implementation stuff */ | ||||||
| 	ams_info.of_node = np; | 	ams_info.of_node = np; | ||||||
| 	ams_info.exit = ams_i2c_exit; | 	ams_info.exit = ams_i2c_exit; | ||||||
|  | @ -266,7 +264,5 @@ int __init ams_i2c_init(struct device_node *np) | ||||||
| 	ams_info.clear_irq = ams_i2c_clear_irq; | 	ams_info.clear_irq = ams_i2c_clear_irq; | ||||||
| 	ams_info.bustype = BUS_I2C; | 	ams_info.bustype = BUS_I2C; | ||||||
| 
 | 
 | ||||||
| 	result = i2c_add_driver(&ams_i2c_driver); | 	return i2c_add_driver(&ams_i2c_driver); | ||||||
| 
 |  | ||||||
| 	return result; |  | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Minghao Chi
						Minghao Chi