mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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
1 changed files with 1 additions and 2 deletions
|
@ -279,8 +279,7 @@ good:
|
|||
}
|
||||
|
||||
out:
|
||||
if (bridge)
|
||||
pci_dev_put(bridge);
|
||||
pci_dev_put(bridge);
|
||||
kfree(bridge_header);
|
||||
kfree(hca_header);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue