Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Leon Romanovsky and committed by
Jason Gunthorpe
b5486430 7610ab57

+1 -1
+1 -1
drivers/infiniband/hw/mlx5/mr.c
··· 1946 1946 mr->mtt_mr = NULL; 1947 1947 } 1948 1948 if (mr->klm_mr) { 1949 - mlx5_ib_dereg_mr(&mr->klm_mr->ibmr, NULL); 1949 + rc = mlx5_ib_dereg_mr(&mr->klm_mr->ibmr, NULL); 1950 1950 if (rc) 1951 1951 return rc; 1952 1952 mr->klm_mr = NULL;