linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: image: microtek: Unneeded variable: "err". Return "0" on line 616
@ 2019-07-01 17:59 Hariprasad Kelam
  2019-07-02  9:27 ` Oliver Neukum
  0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Kelam @ 2019-07-01 17:59 UTC (permalink / raw)
  To: Oliver Neukum, Greg Kroah-Hartman, linux-usb, linux-kernel

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(-)

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)
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: image: microtek: Unneeded variable: "err". Return "0" on line 616
  2019-07-01 17:59 [PATCH] usb: image: microtek: Unneeded variable: "err". Return "0" on line 616 Hariprasad Kelam
@ 2019-07-02  9:27 ` Oliver Neukum
  0 siblings, 0 replies; 2+ messages in thread
From: Oliver Neukum @ 2019-07-02  9:27 UTC (permalink / raw)
  To: Hariprasad Kelam, Greg Kroah-Hartman, linux-kernel, linux-usb

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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-02  9:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-01 17:59 [PATCH] usb: image: microtek: Unneeded variable: "err". Return "0" on line 616 Hariprasad Kelam
2019-07-02  9:27 ` Oliver Neukum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).