diff mbox

[5/8] verbs: Remove bogus cq_fd

Message ID 20171205231721.19410-6-jgg@ziepe.ca (mailing list archive)
State Not Applicable
Headers show

Commit Message

Jason Gunthorpe Dec. 5, 2017, 11:17 p.m. UTC
From: Jason Gunthorpe <jgg@mellanox.com>

No reason to call close on something we know is -1.

This was left by accident after ABI version < 2 support was removed.

Fixes: 6be16586e081 ("Infrastructure to support verbs extensions")
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 libibverbs/device.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox

Patch

diff --git a/libibverbs/device.c b/libibverbs/device.c
index 16a7d4caeac5a0..4fb759c6474ad7 100644
--- a/libibverbs/device.c
+++ b/libibverbs/device.c
@@ -275,7 +275,6 @@  LATEST_SYMVER_FUNC(ibv_close_device, 1_1, "IBVERBS_1.1",
 {
 	int async_fd = context->async_fd;
 	int cmd_fd   = context->cmd_fd;
-	int cq_fd    = -1;
 	struct verbs_context *context_ex;
 	struct verbs_device *verbs_device = verbs_get_device(context->device);
 	struct ibv_device *device = context->device;
@@ -291,8 +290,6 @@  LATEST_SYMVER_FUNC(ibv_close_device, 1_1, "IBVERBS_1.1",
 
 	close(async_fd);
 	close(cmd_fd);
-	if (abi_ver <= 2)
-		close(cq_fd);
 	ibverbs_device_put(device);
 
 	return 0;