diff mbox series

scsi: qla4xxx: Delete unneeded variable 'status' in qla4xxx_process_ddb_changed

Message ID 20200916022749.348923-1-yebin10@huawei.com
State Accepted
Headers show
Series scsi: qla4xxx: Delete unneeded variable 'status' in qla4xxx_process_ddb_changed | expand

Commit Message

Ye Bin Sept. 16, 2020, 2:27 a.m. UTC
Fixes coccicheck warning:
drivers/scsi/qla4xxx/ql4_init.c:1173:5-11: Unneeded variable: "status". Return "QLA_ERROR" on line 1195

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
 drivers/scsi/qla4xxx/ql4_init.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Martin K. Petersen Oct. 3, 2020, 1:58 a.m. UTC | #1
Ye,

> Fixes coccicheck warning:
> drivers/scsi/qla4xxx/ql4_init.c:1173:5-11: Unneeded variable: "status". Return "QLA_ERROR" on line 1195

Applied to 5.10/scsi-staging, thanks!
Martin K. Petersen Oct. 7, 2020, 3:48 a.m. UTC | #2
On Wed, 16 Sep 2020 10:27:49 +0800, Ye Bin wrote:

> Fixes coccicheck warning:
> drivers/scsi/qla4xxx/ql4_init.c:1173:5-11: Unneeded variable: "status". Return "QLA_ERROR" on line 1195

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: qla4xxx: Delete unneeded variable 'status' in qla4xxx_process_ddb_changed
      https://git.kernel.org/mkp/scsi/c/121432e87093
diff mbox series

Patch

diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
index 4a7ef971a387..6444f4bb61b3 100644
--- a/drivers/scsi/qla4xxx/ql4_init.c
+++ b/drivers/scsi/qla4xxx/ql4_init.c
@@ -1170,7 +1170,6 @@  int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha,
 				uint32_t state, uint32_t conn_err)
 {
 	struct ddb_entry *ddb_entry;
-	int status = QLA_ERROR;
 
 	/* check for out of range index */
 	if (fw_ddb_index >= MAX_DDB_ENTRIES)
@@ -1192,7 +1191,7 @@  int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha,
 	ddb_entry->ddb_change(ha, fw_ddb_index, ddb_entry, state);
 
 exit_ddb_event:
-	return status;
+	return QLA_ERROR;
 }
 
 /**