diff mbox series

[hw-next] infiniband/hw:remove unneeded variable

Message ID 20211210021713.423750-1-chi.minghao@zte.com.cn (mailing list archive)
State Superseded
Headers show
Series [hw-next] infiniband/hw:remove unneeded variable | expand

Commit Message

CGEL Dec. 10, 2021, 2:17 a.m. UTC
From: Minghao Chi <chi.minghao@zte.com.cn>

Return status directly from function called.

Reported-by: Zeal Robot <zealci@zte.com.cm>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
 drivers/infiniband/hw/irdma/uk.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/irdma/uk.c b/drivers/infiniband/hw/irdma/uk.c
index 57a9444e9ea7..fe2ba1dd1b03 100644
--- a/drivers/infiniband/hw/irdma/uk.c
+++ b/drivers/infiniband/hw/irdma/uk.c
@@ -244,7 +244,6 @@  __le64 *irdma_qp_get_next_send_wqe(struct irdma_qp_uk *qp, u32 *wqe_idx,
  */
 __le64 *irdma_qp_get_next_recv_wqe(struct irdma_qp_uk *qp, u32 *wqe_idx)
 {
-	__le64 *wqe;
 	enum irdma_status_code ret_code;
 
 	if (IRDMA_RING_FULL_ERR(qp->rq_ring))
@@ -257,9 +256,8 @@  __le64 *irdma_qp_get_next_recv_wqe(struct irdma_qp_uk *qp, u32 *wqe_idx)
 	if (!*wqe_idx)
 		qp->rwqe_polarity = !qp->rwqe_polarity;
 	/* rq_wqe_size_multiplier is no of 32 byte quanta in one rq wqe */
-	wqe = qp->rq_base[*wqe_idx * qp->rq_wqe_size_multiplier].elem;
 
-	return wqe;
+	return qp->rq_base[*wqe_idx * qp->rq_wqe_size_multiplier].elem;
 }
 
 /**