diff options
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_verbs.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index a680c42d6e8c..25b52d2478a8 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c | |||
@@ -3386,8 +3386,10 @@ static int nes_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr, | |||
3386 | wqe_count = 0; | 3386 | wqe_count = 0; |
3387 | total_payload_length = 0; | 3387 | total_payload_length = 0; |
3388 | 3388 | ||
3389 | if (nesqp->ibqp_state > IB_QPS_RTS) | 3389 | if (nesqp->ibqp_state > IB_QPS_RTS) { |
3390 | return -EINVAL; | 3390 | err = -EINVAL; |
3391 | goto out; | ||
3392 | } | ||
3391 | 3393 | ||
3392 | spin_lock_irqsave(&nesqp->lock, flags); | 3394 | spin_lock_irqsave(&nesqp->lock, flags); |
3393 | 3395 | ||
@@ -3498,6 +3500,9 @@ static int nes_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr, | |||
3498 | break; | 3500 | break; |
3499 | } | 3501 | } |
3500 | 3502 | ||
3503 | if (err) | ||
3504 | break; | ||
3505 | |||
3501 | if (ib_wr->send_flags & IB_SEND_SIGNALED) { | 3506 | if (ib_wr->send_flags & IB_SEND_SIGNALED) { |
3502 | wqe_misc |= NES_IWARP_SQ_WQE_SIGNALED_COMPL; | 3507 | wqe_misc |= NES_IWARP_SQ_WQE_SIGNALED_COMPL; |
3503 | } | 3508 | } |
@@ -3522,6 +3527,7 @@ static int nes_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr, | |||
3522 | 3527 | ||
3523 | spin_unlock_irqrestore(&nesqp->lock, flags); | 3528 | spin_unlock_irqrestore(&nesqp->lock, flags); |
3524 | 3529 | ||
3530 | out: | ||
3525 | if (err) | 3531 | if (err) |
3526 | *bad_wr = ib_wr; | 3532 | *bad_wr = ib_wr; |
3527 | return err; | 3533 | return err; |