Skip to content

Commit bd99ede

Browse files
zhuyjrleon
authored andcommitted
RDMA/irdma: Remove extra ret variable in favor of existing err
In the function irdma_reg_user_mr, err and ret exist. Actually, one variable err is enough. Signed-off-by: Zhu Yanjun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
1 parent cf6a05c commit bd99ede

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/infiniband/hw/irdma/verbs.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2771,7 +2771,6 @@ static struct ib_mr *irdma_reg_user_mr(struct ib_pd *pd, u64 start, u64 len,
27712771
bool use_pbles = false;
27722772
unsigned long flags;
27732773
int err = -EINVAL;
2774-
int ret;
27752774

27762775
if (len > iwdev->rf->sc_dev.hw_attrs.max_mr_size)
27772776
return ERR_PTR(-EINVAL);
@@ -2871,9 +2870,9 @@ static struct ib_mr *irdma_reg_user_mr(struct ib_pd *pd, u64 start, u64 len,
28712870
goto error;
28722871

28732872
if (use_pbles) {
2874-
ret = irdma_check_mr_contiguous(palloc,
2873+
err = irdma_check_mr_contiguous(palloc,
28752874
iwmr->page_size);
2876-
if (ret) {
2875+
if (err) {
28772876
irdma_free_pble(iwdev->rf->pble_rsrc, palloc);
28782877
iwpbl->pbl_allocated = false;
28792878
}

0 commit comments

Comments
 (0)