Skip to contentSkip to conversation

scsi: mvsas: remove redundant assignment to variable rc

PATCH Applied Colin King 2 participants 2 messages Sep 5, 2019 – Oct 1, 2019

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 scsi: mvsas: remove redundant assignment to variable rc

From: Colin Ian King <[email protected]>

The variable rc is being initialized with a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed.

Addresses-Coverity: ("Unused value")

---
 drivers/scsi/mvsas/mv_sas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mvsas/mv_sas.c +1 -1
index 3e0b8ebe257f..a920eced92ec 100644
@@ -1541,7 +1541,7 @@ int mvs_abort_task(struct sas_task *task)
 
 int mvs_abort_task_set(struct domain_device *dev, u8 *lun)
 {
-	int rc = TMF_RESP_FUNC_FAILED;
+	int rc;
 	struct mvs_tmf_task tmf_task;
 
 	tmf_task.tmf = TMF_ABORT_TASK_SET;
Signature · 1 line
2.20.1
#1 lore raw

Colin,

Quoted 3 lines

The variable rc is being initialized with a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed.

Applied to 5.5/scsi-queue, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering