mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
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 <yanjun.zhu@linux.dev> Link: https://lore.kernel.org/r/20230104064333.660344-1-yanjun.zhu@intel.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
cf6a05c849
commit
bd99ede8ef
1 changed files with 2 additions and 3 deletions
|
@ -2771,7 +2771,6 @@ static struct ib_mr *irdma_reg_user_mr(struct ib_pd *pd, u64 start, u64 len,
|
|||
bool use_pbles = false;
|
||||
unsigned long flags;
|
||||
int err = -EINVAL;
|
||||
int ret;
|
||||
|
||||
if (len > iwdev->rf->sc_dev.hw_attrs.max_mr_size)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
@ -2871,9 +2870,9 @@ static struct ib_mr *irdma_reg_user_mr(struct ib_pd *pd, u64 start, u64 len,
|
|||
goto error;
|
||||
|
||||
if (use_pbles) {
|
||||
ret = irdma_check_mr_contiguous(palloc,
|
||||
err = irdma_check_mr_contiguous(palloc,
|
||||
iwmr->page_size);
|
||||
if (ret) {
|
||||
if (err) {
|
||||
irdma_free_pble(iwdev->rf->pble_rsrc, palloc);
|
||||
iwpbl->pbl_allocated = false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue