Skip to content

Commit 3d0f934

Browse files
Justin Teemartinkpetersen
authored andcommitted
scsi: lpfc: Initialize status local variable in lpfc_sli4_repost_sgl_list()
A static code analyzer tool indicates that the local variable called status in the lpfc_sli4_repost_sgl_list() routine could be used to print garbage uninitialized values in the routine's log message. Fix by initializing to zero. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20240131185112.149731-2-justintee8345@gmail.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 6613476 commit 3d0f934

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/scsi/lpfc/lpfc_sli.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7582,7 +7582,7 @@ lpfc_sli4_repost_sgl_list(struct lpfc_hba *phba,
75827582
struct lpfc_sglq *sglq_entry = NULL;
75837583
struct lpfc_sglq *sglq_entry_next = NULL;
75847584
struct lpfc_sglq *sglq_entry_first = NULL;
7585-
int status, total_cnt;
7585+
int status = 0, total_cnt;
75867586
int post_cnt = 0, num_posted = 0, block_cnt = 0;
75877587
int last_xritag = NO_XRI;
75887588
LIST_HEAD(prep_sgl_list);

0 commit comments

Comments
 (0)