diff mbox series

scsi: elx: efct: Remove redundant initialization of variable ret

Message ID 20210804132451.113086-1-colin.king@canonical.com
State New
Headers show
Series scsi: elx: efct: Remove redundant initialization of variable ret | expand

Commit Message

Colin King Aug. 4, 2021, 1:24 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

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 <colin.king@canonical.com>
---
 drivers/scsi/elx/efct/efct_lio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin K. Petersen Aug. 10, 2021, 3:41 a.m. UTC | #1
Colin,

> 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.


Applied to 5.15/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering
Martin K. Petersen Aug. 17, 2021, 3:17 a.m. UTC | #2
On Wed, 4 Aug 2021 14:24:51 +0100, Colin King wrote:

> From: Colin Ian King <colin.king@canonical.com>

> 

> 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.

> 

> 

> [...]


Applied to 5.15/scsi-queue, thanks!

[1/1] scsi: elx: efct: Remove redundant initialization of variable ret
      https://git.kernel.org/mkp/scsi/c/e71dd41ea002

-- 
Martin K. Petersen	Oracle Linux Engineering
diff mbox series

Patch

diff --git a/drivers/scsi/elx/efct/efct_lio.c b/drivers/scsi/elx/efct/efct_lio.c
index e0d798d6baee..bb3b460dc0bc 100644
--- a/drivers/scsi/elx/efct/efct_lio.c
+++ b/drivers/scsi/elx/efct/efct_lio.c
@@ -780,7 +780,7 @@  efct_lio_npiv_make_nport(struct target_fabric_configfs *tf,
 {
 	struct efct_lio_vport *lio_vport;
 	struct efct *efct;
-	int ret = -1;
+	int ret;
 	u64 p_wwpn, npiv_wwpn, npiv_wwnn;
 	char *p, *pbuf, tmp[128];
 	struct efct_lio_vport_list_t *vport_list;