diff options
Diffstat (limited to 'drivers/infiniband/core/verbs.c')
-rw-r--r-- | drivers/infiniband/core/verbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index 602b1bd723a9..575b78045aaf 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c | |||
@@ -421,6 +421,7 @@ struct ib_qp *ib_create_qp(struct ib_pd *pd, | |||
421 | qp->uobject = NULL; | 421 | qp->uobject = NULL; |
422 | qp->qp_type = qp_init_attr->qp_type; | 422 | qp->qp_type = qp_init_attr->qp_type; |
423 | 423 | ||
424 | atomic_set(&qp->usecnt, 0); | ||
424 | if (qp_init_attr->qp_type == IB_QPT_XRC_TGT) { | 425 | if (qp_init_attr->qp_type == IB_QPT_XRC_TGT) { |
425 | qp->event_handler = __ib_shared_qp_event_handler; | 426 | qp->event_handler = __ib_shared_qp_event_handler; |
426 | qp->qp_context = qp; | 427 | qp->qp_context = qp; |
@@ -430,7 +431,6 @@ struct ib_qp *ib_create_qp(struct ib_pd *pd, | |||
430 | qp->xrcd = qp_init_attr->xrcd; | 431 | qp->xrcd = qp_init_attr->xrcd; |
431 | atomic_inc(&qp_init_attr->xrcd->usecnt); | 432 | atomic_inc(&qp_init_attr->xrcd->usecnt); |
432 | INIT_LIST_HEAD(&qp->open_list); | 433 | INIT_LIST_HEAD(&qp->open_list); |
433 | atomic_set(&qp->usecnt, 0); | ||
434 | 434 | ||
435 | real_qp = qp; | 435 | real_qp = qp; |
436 | qp = __ib_open_qp(real_qp, qp_init_attr->event_handler, | 436 | qp = __ib_open_qp(real_qp, qp_init_attr->event_handler, |