diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2016-07-23 11:05:12 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-08-04 04:03:35 +0300 |
commit | 3491ab63b45ea9b485683574081ed8535d42f2da (patch) | |
tree | 5ec8e5b1adde002a02e1cbcfce4fe8ba7aa068f5 /drivers | |
parent | f7ca535ba0b2268609d50bcd4bc3e8267dfd01b3 (diff) | |
download | linux-3491ab63b45ea9b485683574081ed8535d42f2da.tar.xz |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_reset.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_reset.c b/drivers/infiniband/hw/mthca/mthca_reset.c index 74c6a9426047..c5216542477c 100644 --- a/drivers/infiniband/hw/mthca/mthca_reset.c +++ b/drivers/infiniband/hw/mthca/mthca_reset.c @@ -279,8 +279,7 @@ good: } out: - if (bridge) - pci_dev_put(bridge); + pci_dev_put(bridge); kfree(bridge_header); kfree(hca_header); |