diff mbox series

scsi: snic: Remove redundant assignment to variable ret

Message ID 20210806112313.12434-1-colin.king@canonical.com (mailing list archive)
State Accepted
Headers show
Series scsi: snic: Remove redundant assignment to variable ret | expand

Commit Message

Colin King Aug. 6, 2021, 11:23 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The variable ret is being initialized with a value that is never read,
the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/scsi/snic/snic_scsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin K. Petersen Aug. 10, 2021, 3:24 a.m. UTC | #1
Colin,

> The variable ret is being initialized with a value that is never read,
> the assignment is redundant and can be removed.

Applied to 5.15/scsi-staging, thanks!
Martin K. Petersen Aug. 17, 2021, 3:17 a.m. UTC | #2
On Fri, 6 Aug 2021 12:23:13 +0100, Colin King wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable ret is being initialized with a value that is never read,
> the assignment is redundant and can be removed.
> 
> 
> 
> [...]

Applied to 5.15/scsi-queue, thanks!

[1/1] scsi: snic: Remove redundant assignment to variable ret
      https://git.kernel.org/mkp/scsi/c/e9b1adb7c5e3
diff mbox series

Patch

diff --git a/drivers/scsi/snic/snic_scsi.c b/drivers/scsi/snic/snic_scsi.c
index 6dd0ff188bb4..92f5b65c2a27 100644
--- a/drivers/scsi/snic/snic_scsi.c
+++ b/drivers/scsi/snic/snic_scsi.c
@@ -2383,7 +2383,7 @@  snic_host_reset(struct scsi_cmnd *sc)
 {
 	struct Scsi_Host *shost = sc->device->host;
 	u32 start_time  = jiffies;
-	int ret = FAILED;
+	int ret;
 
 	SNIC_SCSI_DBG(shost,
 		      "host reset:sc %p sc_cmd 0x%x req %p tag %d flags 0x%llx\n",