[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210316095117.17089-1-colin.king@canonical.com>
Date: Tue, 16 Mar 2021 09:51:17 +0000
From: Colin King <colin.king@...onical.com>
To: Leon Romanovsky <leon@...nel.org>,
Doug Ledford <dledford@...hat.com>,
Jason Gunthorpe <jgg@...pe.ca>, linux-rdma@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH][next] RDMA/mlx5: Fix missing assignment of rc when calling mlx5_ib_dereg_mr
From: Colin Ian King <colin.king@...onical.com>
The assignment of the return code to rc when calling mlx5_ib_dereg_mr is
missing and there is an error check on an uninitialized rc. Fix this by
adding in the assignment.
Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: e6fb246ccafb ("RDMA/mlx5: Consolidate MR destruction to mlx5_ib_dereg_mr()")
Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
drivers/infiniband/hw/mlx5/mr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.30.2
Powered by blists - more mailing lists