diff mbox series

scsi: pm8001: Remove redundant initialization of variable rv

Message ID 20210804143319.115340-1-colin.king@canonical.com
State New
Headers show
Series scsi: pm8001: Remove redundant initialization of variable rv | expand

Commit Message

Colin King Aug. 4, 2021, 2:33 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The variable rv is being initialized with a value that is never
read, it is being updated later on. The assignment is redundant and
can be removed.

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

Comments

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

> The variable rv is being initialized with a value that is never read,

> it is being updated later on. The assignment is redundant and can be

> removed.


Applied to 5.15/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering
Martin K. Petersen Aug. 17, 2021, 3:17 a.m. UTC | #2
On Wed, 4 Aug 2021 15:33:19 +0100, Colin King wrote:

> From: Colin Ian King <colin.king@canonical.com>

> 

> The variable rv is being initialized with a value that is never

> read, it is being updated later on. The assignment is redundant and

> can be removed.

> 

> 

> [...]


Applied to 5.15/scsi-queue, thanks!

[1/1] scsi: pm8001: Remove redundant initialization of variable rv
      https://git.kernel.org/mkp/scsi/c/83da6ad6f97e

-- 
Martin K. Petersen	Oracle Linux Engineering
diff mbox series

Patch

diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index 17c0f26e683a..63690508313b 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -1323,7 +1323,7 @@  int pm8001_mpi_build_cmd(struct pm8001_hba_info *pm8001_ha,
 	void *pMessage;
 	unsigned long flags;
 	int q_index = circularQ - pm8001_ha->inbnd_q_tbl;
-	int rv = -1;
+	int rv;
 
 	WARN_ON(q_index >= PM8001_MAX_INB_NUM);
 	spin_lock_irqsave(&circularQ->iq_lock, flags);