1
0
Fork 0

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>
wifi-calibration
Markus Elfring 2015-02-02 22:08:29 +01:00 committed by Tejun Heo
parent 1726390539
commit 214f1aff3f
1 changed files with 2 additions and 4 deletions

View File

@ -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;
}