diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 426c5aaf4..fe23cb995 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -950,7 +950,6 @@ static int srpt_post_recv(struct srpt_device *sdev, struct srpt_rdma_ch *ch, { struct ib_sge list; struct ib_recv_wr wr, *bad_wr; - int status; BUG_ON(!sdev); wr.wr_id = encode_wr_id(SRPT_RECV, ioctx->ioctx.index); @@ -964,10 +963,9 @@ static int srpt_post_recv(struct srpt_device *sdev, struct srpt_rdma_ch *ch, wr.num_sge = 1; if (sdev->use_srq) - status = ib_post_srq_recv(sdev->srq, &wr, &bad_wr); + return ib_post_srq_recv(sdev->srq, &wr, &bad_wr); else - status = ib_post_recv(ch->qp, &wr, &bad_wr); - return status; + return ib_post_recv(ch->qp, &wr, &bad_wr); } static int srpt_adjust_sq_wr_avail(struct srpt_rdma_ch *ch, int delta)