summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb4/qp.c
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2010-09-10 11:14:48 -0500
committerRoland Dreier <rolandd@cisco.com>2010-09-28 10:46:29 -0700
commitaf93fb5dcc6b1cba5fd0861d349b3f9c93144bc0 (patch)
tree9fde36683bb652635ed8d8a45abd0178a2c11803 /drivers/infiniband/hw/cxgb4/qp.c
parentc8e081a1bf11c5cbac5f2f9f53c040be61d7b29e (diff)
RDMA/cxgb4: Don't use null ep ptr
In c4iw_modify_qp() error path, only use qhp->ep if ep is not already set. Otherwise qhp->ep can be NULL and we crash. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/qp.c')
-rw-r--r--drivers/infiniband/hw/cxgb4/qp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
index 5d11f860159..4f5dd66da39 100644
--- a/drivers/infiniband/hw/cxgb4/qp.c
+++ b/drivers/infiniband/hw/cxgb4/qp.c
@@ -1305,7 +1305,8 @@ err:
/* disassociate the LLP connection */
qhp->attr.llp_stream_handle = NULL;
- ep = qhp->ep;
+ if (!ep)
+ ep = qhp->ep;
qhp->ep = NULL;
qhp->attr.state = C4IW_QP_STATE_ERROR;
free = 1;