]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
rds: Don't check return value from destroy CQ
authorLeon Romanovsky <leonro@mellanox.com>
Mon, 20 May 2019 06:54:19 +0000 (09:54 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 21 May 2019 18:50:53 +0000 (15:50 -0300)
There is no value in checking ib_destroy_cq() result and skipping to clear
struct ic fields. This connection needs to be reinitialized anyway.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
net/rds/ib_cm.c

index 66c6eb56072b712015fdaebb3dfc8af17408d91e..5a42ebb892cdb68de2c077f29a1db24ba6c31af1 100644 (file)
@@ -611,11 +611,11 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
 qp_out:
        rdma_destroy_qp(ic->i_cm_id);
 recv_cq_out:
-       if (!ib_destroy_cq(ic->i_recv_cq))
-               ic->i_recv_cq = NULL;
+       ib_destroy_cq(ic->i_recv_cq);
+       ic->i_recv_cq = NULL;
 send_cq_out:
-       if (!ib_destroy_cq(ic->i_send_cq))
-               ic->i_send_cq = NULL;
+       ib_destroy_cq(ic->i_send_cq);
+       ic->i_send_cq = NULL;
 rds_ibdev_out:
        rds_ib_remove_conn(rds_ibdev, conn);
 out: