Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Markus Elfring and committed by
Tejun Heo
214f1aff 17263905

+2 -4
+2 -4
drivers/ata/pata_cs5530.c
··· 276 276 pci_dev_put(cs5530_0); 277 277 return 0; 278 278 fail_put: 279 - if (master_0) 280 - pci_dev_put(master_0); 281 - if (cs5530_0) 282 - pci_dev_put(cs5530_0); 279 + pci_dev_put(master_0); 280 + pci_dev_put(cs5530_0); 283 281 return -ENODEV; 284 282 } 285 283