Blob Blame History Raw
From: Chi Minghao <chi.minghao@zte.com.cn>
Date: Tue, 31 Aug 2021 04:40:58 -0700
Subject: scsi: lpfc: Remove unneeded variable
Patch-mainline: v5.15-rc3
Git-commit: 5d1e15108b8d058d537f19cdef4170d2ae4eed08
References: bsc#1190576

Fix the following coccicheck REVIEW:

./drivers/scsi/lpfc/lpfc_scsi.c:1498:9-12 REVIEW Unneeded variable

Link: https://lore.kernel.org/r/20210831114058.17817-1-lv.ruyi@zte.com.cn
Reported-by: Zeal Robot <zealci@zte.com.cm>
Reviewed-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Chi Minghao <chi.minghao@zte.com.cn>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Daniel Wagner <dwagner@suse.de>
---
 drivers/scsi/lpfc/lpfc_scsi.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -1486,7 +1486,6 @@ static int
 lpfc_bg_err_opcodes(struct lpfc_hba *phba, struct scsi_cmnd *sc,
 		uint8_t *txop, uint8_t *rxop)
 {
-	uint8_t ret = 0;
 
 	if (sc->prot_flags & SCSI_PROT_IP_CHECKSUM) {
 		switch (scsi_get_prot_op(sc)) {
@@ -1539,7 +1538,7 @@ lpfc_bg_err_opcodes(struct lpfc_hba *phb
 		}
 	}
 
-	return ret;
+	return 0;
 }
 #endif