Message ID | 20190701175958.GA9826@hari-Inspiron-1545 (mailing list archive) |
---|---|
State | Mainlined |
Commit | a570ec79641a697db12a28960d6a5318ca4f37f2 |
Headers | show |
Series | usb: image: microtek: Unneeded variable: "err". Return "0" on line 616 | expand |
Am Montag, den 01.07.2019, 23:29 +0530 schrieb Hariprasad Kelam: > 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 > > Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com> Acked-by: Oliver Neukum <oneukum@suse.com>
diff --git a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c index 0a57c2c..ebe1362 100644 --- a/drivers/usb/image/microtek.c +++ b/drivers/usb/image/microtek.c @@ -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)
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 Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com> --- drivers/usb/image/microtek.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)