diff options
author | Leon Romanovsky <leonro@nvidia.com> | 2021-03-14 09:22:50 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-03-22 13:28:51 +0100 |
commit | b5486430bb0fbb4f2bd1e06bd85921395ba357a6 (patch) | |
tree | a892d8480b71eb72a19f1c02c7d62b207a49f056 | |
parent | RDMA/mlx5: Allow larger pages in DevX umem (diff) | |
download | linux-b5486430bb0fbb4f2bd1e06bd85921395ba357a6.tar.xz linux-b5486430bb0fbb4f2bd1e06bd85921395ba357a6.zip |
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: e6fb246ccafb ("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>
-rw-r--r-- | drivers/infiniband/hw/mlx5/mr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c index 86ffc7e5ef96..9dcb9fb4eeaa 100644 --- a/drivers/infiniband/hw/mlx5/mr.c +++ b/drivers/infiniband/hw/mlx5/mr.c @@ -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; |