mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	ata: Delete unnecessary checks before the function call "pci_dev_put"
The pci_dev_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
		
							parent
							
								
									1726390539
								
							
						
					
					
						commit
						214f1aff3f
					
				
					 1 changed files with 2 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -276,10 +276,8 @@ static int cs5530_init_chip(void)
 | 
			
		|||
	pci_dev_put(cs5530_0);
 | 
			
		||||
	return 0;
 | 
			
		||||
fail_put:
 | 
			
		||||
	if (master_0)
 | 
			
		||||
		pci_dev_put(master_0);
 | 
			
		||||
	if (cs5530_0)
 | 
			
		||||
		pci_dev_put(cs5530_0);
 | 
			
		||||
	pci_dev_put(master_0);
 | 
			
		||||
	pci_dev_put(cs5530_0);
 | 
			
		||||
	return -ENODEV;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue