Skip to content

Commit cb3bfbf

Browse files
ColinIanKingmartinkpetersen
authored andcommitted
scsi: bnx2fc: Remove redundant assignment to variable 'i'
The variable 'i' is being assigned a value that is never read, the following code path via the label ofld_err never refers to the variable. The assignment is redundant and can be removed. Cleans up clang scan warning: drivers/scsi/bnx2fc/bnx2fc_tgt.c:132:5: warning: Value stored to 'i' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 28027ec commit cb3bfbf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/scsi/bnx2fc/bnx2fc_tgt.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,8 @@ static void bnx2fc_offload_session(struct fcoe_port *port,
128128
BNX2FC_TGT_DBG(tgt, "ctx_alloc_failure, "
129129
"retry ofld..%d\n", i++);
130130
msleep_interruptible(1000);
131-
if (i > 3) {
132-
i = 0;
131+
if (i > 3)
133132
goto ofld_err;
134-
}
135133
goto retry_ofld;
136134
}
137135
goto ofld_err;

0 commit comments

Comments
 (0)