Commit cf4d4d8e authored by Jing Xiangfeng's avatar Jing Xiangfeng Committed by Martin K. Petersen

scsi: qla4xxx: Remove redundant assignment to variable rval

The variable rval has been initialized with 'QLA_ERROR'. The assignment is
redundant in an error path. Remove it.

Link: https://lore.kernel.org/r/20201103120137.109717-1-jingxiangfeng@huawei.comSigned-off-by: default avatarJing Xiangfeng <jingxiangfeng@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent d9fa1e73
...@@ -685,7 +685,6 @@ static int qla4xxx_get_chap_by_index(struct scsi_qla_host *ha, ...@@ -685,7 +685,6 @@ static int qla4xxx_get_chap_by_index(struct scsi_qla_host *ha,
if (!ha->chap_list) { if (!ha->chap_list) {
ql4_printk(KERN_ERR, ha, "CHAP table cache is empty!\n"); ql4_printk(KERN_ERR, ha, "CHAP table cache is empty!\n");
rval = QLA_ERROR;
goto exit_get_chap; goto exit_get_chap;
} }
...@@ -697,14 +696,12 @@ static int qla4xxx_get_chap_by_index(struct scsi_qla_host *ha, ...@@ -697,14 +696,12 @@ static int qla4xxx_get_chap_by_index(struct scsi_qla_host *ha,
if (chap_index > max_chap_entries) { if (chap_index > max_chap_entries) {
ql4_printk(KERN_ERR, ha, "Invalid Chap index\n"); ql4_printk(KERN_ERR, ha, "Invalid Chap index\n");
rval = QLA_ERROR;
goto exit_get_chap; goto exit_get_chap;
} }
*chap_entry = (struct ql4_chap_table *)ha->chap_list + chap_index; *chap_entry = (struct ql4_chap_table *)ha->chap_list + chap_index;
if ((*chap_entry)->cookie != if ((*chap_entry)->cookie !=
__constant_cpu_to_le16(CHAP_VALID_COOKIE)) { __constant_cpu_to_le16(CHAP_VALID_COOKIE)) {
rval = QLA_ERROR;
*chap_entry = NULL; *chap_entry = NULL;
} else { } else {
rval = QLA_SUCCESS; rval = QLA_SUCCESS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment