scsi: elx: efct: Remove redundant initialization of variable 'ret'
authorColin Ian King <colin.king@canonical.com>
Wed, 4 Aug 2021 13:24:51 +0000 (14:24 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 10 Aug 2021 03:41:19 +0000 (23:41 -0400)
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.

Link: https://lore.kernel.org/r/20210804132451.113086-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Addresses-Coverity: ("Unused value")

drivers/scsi/elx/efct/efct_lio.c

index e0d798d6baee3c17925075d0ea8fb81c17f4d1c8..bb3b460dc0bcd5a3db52f3b2cc488fd381ed399a 100644 (file)
@@ -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;