diff options
author | Shiraz Saleem <shiraz.saleem@intel.com> | 2016-12-01 00:09:07 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-12-06 00:09:42 +0300 |
commit | e0b010da87e3aaf7ca9d28ba5d141924a7f8c66d (patch) | |
tree | 366c951a4542013ea26f18862218cdb1d5b6c64f | |
parent | a05e15135b67d71f30f70ab45dede4706f988439 (diff) | |
download | linux-e0b010da87e3aaf7ca9d28ba5d141924a7f8c66d.tar.xz |
i40iw: Add NULL check for ibqp event handler
Add NULL check for ibqp event handler before calling it to report
QP events, as it might not initialized.
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | drivers/infiniband/hw/i40iw/i40iw_cm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_cm.c b/drivers/infiniband/hw/i40iw/i40iw_cm.c index 9a14880fe85a..13b6dee4d57c 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_cm.c +++ b/drivers/infiniband/hw/i40iw/i40iw_cm.c @@ -3474,7 +3474,7 @@ static void i40iw_cm_disconn_true(struct i40iw_qp *iwqp) /* Flush the queues */ i40iw_flush_wqes(iwdev, iwqp); - if (qp->term_flags) { + if (qp->term_flags && iwqp->ibqp.event_handler) { ibevent.device = iwqp->ibqp.device; ibevent.event = (qp->eventtype == TERM_EVENT_QP_FATAL) ? IB_EVENT_QP_FATAL : IB_EVENT_QP_ACCESS_ERR; |