From: Hariprasad Kelam <hariprasad.kelam@gmail.com>
To: Oliver Neukum <oliver@neukum.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] usb: image: microtek: Unneeded variable: "err". Return "0" on line 616
Date: Mon, 1 Jul 2019 23:29:58 +0530 [thread overview]
Message-ID: <20190701175958.GA9826@hari-Inspiron-1545> (raw)
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
next reply other threads:[~2019-07-01 18:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-01 17:59 Hariprasad Kelam [this message]
2019-07-02 9:27 ` [PATCH] usb: image: microtek: Unneeded variable: "err". Return "0" on line 616 Oliver Neukum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190701175958.GA9826@hari-Inspiron-1545 \
--to=hariprasad.kelam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oliver@neukum.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox