aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/nes/nes.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/nes/nes.c')
-rw-r--r--drivers/infiniband/hw/nes/nes.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c
index d2884e778098..b0cab64e5e3d 100644
--- a/drivers/infiniband/hw/nes/nes.c
+++ b/drivers/infiniband/hw/nes/nes.c
@@ -276,6 +276,7 @@ static void nes_cqp_rem_ref_callback(struct nes_device *nesdev, struct nes_cqp_r
276 } 276 }
277 nes_free_resource(nesadapter, nesadapter->allocated_qps, nesqp->hwqp.qp_id); 277 nes_free_resource(nesadapter, nesadapter->allocated_qps, nesqp->hwqp.qp_id);
278 278
279 nesadapter->qp_table[nesqp->hwqp.qp_id-NES_FIRST_QPN] = NULL;
279 kfree(nesqp->allocated_buffer); 280 kfree(nesqp->allocated_buffer);
280 281
281} 282}
@@ -289,7 +290,6 @@ void nes_rem_ref(struct ib_qp *ibqp)
289 struct nes_qp *nesqp; 290 struct nes_qp *nesqp;
290 struct nes_vnic *nesvnic = to_nesvnic(ibqp->device); 291 struct nes_vnic *nesvnic = to_nesvnic(ibqp->device);
291 struct nes_device *nesdev = nesvnic->nesdev; 292 struct nes_device *nesdev = nesvnic->nesdev;
292 struct nes_adapter *nesadapter = nesdev->nesadapter;
293 struct nes_hw_cqp_wqe *cqp_wqe; 293 struct nes_hw_cqp_wqe *cqp_wqe;
294 struct nes_cqp_request *cqp_request; 294 struct nes_cqp_request *cqp_request;
295 u32 opcode; 295 u32 opcode;
@@ -303,8 +303,6 @@ void nes_rem_ref(struct ib_qp *ibqp)
303 } 303 }
304 304
305 if (atomic_dec_and_test(&nesqp->refcount)) { 305 if (atomic_dec_and_test(&nesqp->refcount)) {
306 nesadapter->qp_table[nesqp->hwqp.qp_id-NES_FIRST_QPN] = NULL;
307
308 /* Destroy the QP */ 306 /* Destroy the QP */
309 cqp_request = nes_get_cqp_request(nesdev); 307 cqp_request = nes_get_cqp_request(nesdev);
310 if (cqp_request == NULL) { 308 if (cqp_request == NULL) {