mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 15:11:31 +00:00
RDMA/mlx5: Add missing returned error check of mlx5_ib_dereg_mr
Fix the following smatch error:
drivers/infiniband/hw/mlx5/mr.c:1950 mlx5_ib_dereg_mr() error: uninitialized symbol 'rc'.
Fixes: e6fb246cca
("RDMA/mlx5: Consolidate MR destruction to mlx5_ib_dereg_mr()")
Link: https://lore.kernel.org/r/20210314082250.10143-1-leon@kernel.org
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
7610ab57de
commit
b5486430bb
@ -1946,7 +1946,7 @@ int mlx5_ib_dereg_mr(struct ib_mr *ibmr, struct ib_udata *udata)
|
||||
mr->mtt_mr = NULL;
|
||||
}
|
||||
if (mr->klm_mr) {
|
||||
mlx5_ib_dereg_mr(&mr->klm_mr->ibmr, NULL);
|
||||
rc = mlx5_ib_dereg_mr(&mr->klm_mr->ibmr, NULL);
|
||||
if (rc)
|
||||
return rc;
|
||||
mr->klm_mr = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user