nvme: remove redundant initialization of variable ret
Subsystems (2)
PATCH 1/1 nvme: remove redundant initialization of variable ret
From: Colin Ian King <[email protected]>
The variable ret is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>
--- drivers/nvme/host/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/rdma.c +1 -1
@@ -1088,7 +1088,7 @@ static void nvme_rdma_reconnect_or_remove(struct nvme_rdma_ctrl *ctrl)static int nvme_rdma_setup_ctrl (struct nvme_rdma_ctrl *ctrl,bool new) { -int ret = -EINVAL ; +int ret;bool changed; ret =nvme_rdma_configure_admin_queue (ctrl, new);
Signature · 1 line
2.30.2
drivers/nvme/host/rdma.c static void nvme_rdma_reconnect_or_remove(struct nvme_rdma_ctrl *ctrl) · line 1092
Quoted 6 lines · Colin King
drivers/nvme/host/rdma.c +1
-1-int ret = -EINVAL ; +int ret;bool changed;
It'd be nice to move ret declaration after book changed.
Thanks,
applied to nvme-5.14.