diff options
author | Steve Wise <swise@opengridcomputing.com> | 2010-09-10 12:14:48 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-09-28 13:46:29 -0400 |
commit | af93fb5dcc6b1cba5fd0861d349b3f9c93144bc0 (patch) | |
tree | 9fde36683bb652635ed8d8a45abd0178a2c11803 /drivers/infiniband/hw/cxgb4/qp.c | |
parent | c8e081a1bf11c5cbac5f2f9f53c040be61d7b29e (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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index 5d11f8601599..4f5dd66da39d 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c | |||
@@ -1305,7 +1305,8 @@ err: | |||
1305 | 1305 | ||
1306 | /* disassociate the LLP connection */ | 1306 | /* disassociate the LLP connection */ |
1307 | qhp->attr.llp_stream_handle = NULL; | 1307 | qhp->attr.llp_stream_handle = NULL; |
1308 | ep = qhp->ep; | 1308 | if (!ep) |
1309 | ep = qhp->ep; | ||
1309 | qhp->ep = NULL; | 1310 | qhp->ep = NULL; |
1310 | qhp->attr.state = C4IW_QP_STATE_ERROR; | 1311 | qhp->attr.state = C4IW_QP_STATE_ERROR; |
1311 | free = 1; | 1312 | free = 1; |