diff options
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_srq.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_verbs.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_srq.c b/drivers/infiniband/hw/ipath/ipath_srq.c index 434da6270f65..2fef36f4b675 100644 --- a/drivers/infiniband/hw/ipath/ipath_srq.c +++ b/drivers/infiniband/hw/ipath/ipath_srq.c | |||
@@ -59,7 +59,7 @@ int ipath_post_srq_receive(struct ib_srq *ibsrq, struct ib_recv_wr *wr, | |||
59 | 59 | ||
60 | if ((unsigned) wr->num_sge > srq->rq.max_sge) { | 60 | if ((unsigned) wr->num_sge > srq->rq.max_sge) { |
61 | *bad_wr = wr; | 61 | *bad_wr = wr; |
62 | ret = -ENOMEM; | 62 | ret = -EINVAL; |
63 | goto bail; | 63 | goto bail; |
64 | } | 64 | } |
65 | 65 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index 74f77e7c2c1b..c4c998446c7b 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c | |||
@@ -302,8 +302,10 @@ static int ipath_post_one_send(struct ipath_qp *qp, struct ib_send_wr *wr) | |||
302 | next = qp->s_head + 1; | 302 | next = qp->s_head + 1; |
303 | if (next >= qp->s_size) | 303 | if (next >= qp->s_size) |
304 | next = 0; | 304 | next = 0; |
305 | if (next == qp->s_last) | 305 | if (next == qp->s_last) { |
306 | goto bail_inval; | 306 | ret = -ENOMEM; |
307 | goto bail; | ||
308 | } | ||
307 | 309 | ||
308 | wqe = get_swqe_ptr(qp, qp->s_head); | 310 | wqe = get_swqe_ptr(qp, qp->s_head); |
309 | wqe->wr = *wr; | 311 | wqe->wr = *wr; |
@@ -404,7 +406,7 @@ static int ipath_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, | |||
404 | 406 | ||
405 | if ((unsigned) wr->num_sge > qp->r_rq.max_sge) { | 407 | if ((unsigned) wr->num_sge > qp->r_rq.max_sge) { |
406 | *bad_wr = wr; | 408 | *bad_wr = wr; |
407 | ret = -ENOMEM; | 409 | ret = -EINVAL; |
408 | goto bail; | 410 | goto bail; |
409 | } | 411 | } |
410 | 412 | ||