diff mbox series

scsi: qla4xxx: remove redundant assignment to variable rval

Message ID 20201204191810.1150995-1-colin.king@canonical.com
State New
Headers show
Series scsi: qla4xxx: remove redundant assignment to variable rval | expand

Commit Message

Colin King Dec. 4, 2020, 7:18 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The variable rval is being initialized with a value that is never read
and it is being updated later with a new value.  The initialization is
redundant and can be removed.

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

Comments

Martin K. Petersen Dec. 8, 2020, 1:58 a.m. UTC | #1
Colin,

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

> and it is being updated later with a new value.  The initialization is

> redundant and can be removed.


Applied to 5.11/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering
Martin K. Petersen Dec. 9, 2020, 5:23 p.m. UTC | #2
On Fri, 4 Dec 2020 19:18:10 +0000, Colin King wrote:

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

> and it is being updated later with a new value.  The initialization is

> redundant and can be removed.


Applied to 5.11/scsi-queue, thanks!

[1/1] scsi: qla4xxx: remove redundant assignment to variable rval
      https://git.kernel.org/mkp/scsi/c/3a5b9fa2cc5f

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

Patch

diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index fd30fbd0d33c..e6e35e6958f6 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -1767,7 +1767,7 @@  qla4_82xx_start_firmware(struct scsi_qla_host *ha, uint32_t image_start)
 
 int qla4_82xx_try_start_fw(struct scsi_qla_host *ha)
 {
-	int rval = QLA_ERROR;
+	int rval;
 
 	/*
 	 * FW Load priority: