提交 3491ab63 编写于 作者: M Markus Elfring 提交者: Doug Ledford

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: NMarkus Elfring <elfring@users.sourceforge.net>
Reviewed-by: NLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 f7ca535b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册