i40iw: Add NULL check for ibqp event handler
PATCH 1/1 i40iw: Add NULL check for ibqp event handler
From: Shiraz Saleem <[email protected]>
Add NULL check for ibqp event handler before calling it to report QP events, as it might not initialized.
Signed-off-by Shiraz Saleem <[email protected]>
Signed-off-by Faisal Latif <[email protected]>
--- drivers/infiniband/hw/i40iw/i40iw_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/i40iw/i40iw_cm.c +1 -1
@@ -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 ;
Signature · 6 lines
2.8.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html