Skip to contentSkip to conversation

usb: image: microtek: Unneeded variable: "err". Return "0" on line 616

PATCH In review Hariprasad Kelam 2 participants 2 messages Jul 1, 2019 – Jul 2, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: image: microtek: Unneeded variable: "err". Return "0" on line 616

Fix below issue reported by coccicheck drivers/usb/image/microtek.c:569:5-8: Unneeded variable: "err". Return "0" on line 616

We can not change return type of mts_scsi_queuecommand_lck as it is part of DEF_SCSI_QCMD

---
 drivers/usb/image/microtek.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/usb/image/microtek.c +1 -2
index 0a57c2c..ebe1362 100644
@@ -566,7 +566,6 @@ static int
 mts_scsi_queuecommand_lck(struct scsi_cmnd *srb, mts_scsi_cmnd_callback callback)
 {
 	struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]);
-	int err = 0;
 	int res;
 
 	MTS_DEBUG_GOT_HERE();
@@ -613,7 +612,7 @@ mts_scsi_queuecommand_lck(struct scsi_cmnd *srb, mts_scsi_cmnd_callback callback
 
 	}
 out:
-	return err;
+	return 0;
 }
 
 static DEF_SCSI_QCMD(mts_scsi_queuecommand)
Signature · 1 line
2.7.4