IB/mthca: NULL arg to pci_dev_put is OK
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> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
f7ca535ba0
commit
3491ab63b4
|
@ -279,8 +279,7 @@ int mthca_reset(struct mthca_dev *mdev)
|
|||
}
|
||||
|
||||
out:
|
||||
if (bridge)
|
||||
pci_dev_put(bridge);
|
||||
pci_dev_put(bridge);
|
||||
kfree(bridge_header);
|
||||
kfree(hca_header);
|
||||
|
||||
|
|
Loading…
Reference in New Issue