Skip to content

Commit 8170c20

Browse files
Zhen Leigregkh
authored andcommitted
scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword()
[ Upstream commit 5cb289b ] Fix to return a negative error code from the error handling case instead of 0 as done elsewhere in this function. Link: https://lore.kernel.org/r/20210514090952.6715-1-thunder.leizhen@huawei.com Fixes: a908301 ("[SCSI] qla2xxx: Add ISP82XX support.") Reported-by: Hulk Robot <hulkci@huawei.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent a6362a7 commit 8170c20

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/scsi/qla2xxx/qla_nx.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,8 @@ qla82xx_write_flash_dword(struct qla_hw_data *ha, uint32_t flashaddr,
10661066
return ret;
10671067
}
10681068

1069-
if (qla82xx_flash_set_write_enable(ha))
1069+
ret = qla82xx_flash_set_write_enable(ha);
1070+
if (ret < 0)
10701071
goto done_write;
10711072

10721073
qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_WDATA, data);

0 commit comments

Comments
 (0)