mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 16:54:21 +00:00 
			
		
		
		
	ARM: rpc: check device_register return code in ecard_probe
device_register is marked __must_check, so we better propagate the error value by returning it from ecard_probe. Without this patch, building rpc_defconfig results in: arch/arm/mach-rpc/ecard.c: In function 'ecard_probe': arch/arm/mach-rpc/ecard.c:963:17: warning: ignoring return value of 'device_register', declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
		
							parent
							
								
									5063557ac0
								
							
						
					
					
						commit
						5f07809e93
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -960,7 +960,9 @@ static int __init ecard_probe(int slot, unsigned irq, card_type_t type) | ||||||
| 	*ecp = ec; | 	*ecp = ec; | ||||||
| 	slot_to_expcard[slot] = ec; | 	slot_to_expcard[slot] = ec; | ||||||
| 
 | 
 | ||||||
| 	device_register(&ec->dev); | 	rc = device_register(&ec->dev); | ||||||
|  | 	if (rc) | ||||||
|  | 		goto nodev; | ||||||
| 
 | 
 | ||||||
| 	return 0; | 	return 0; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Arnd Bergmann
						Arnd Bergmann