Skip to content

Commit

Permalink
RDMA/nes: Don't call event handler if pointer is NULL
Browse files Browse the repository at this point in the history
Don't call the ibqp event_handler pointer in the case it wasn't initialized.

Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com>
Signed-off-by: Donald Wood <Donald.E.Wood@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
  • Loading branch information
Tatyana Nikolova authored and Roland Dreier committed May 14, 2012
1 parent d3e5132 commit 784d135
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/infiniband/hw/nes/nes_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2884,7 +2884,8 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp)
ibevent.device = nesqp->ibqp.device;
ibevent.event = nesqp->terminate_eventtype;
ibevent.element.qp = &nesqp->ibqp;
nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context);
if (nesqp->ibqp.event_handler)
nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context);
}
}

Expand Down

0 comments on commit 784d135

Please sign in to comment.