Skip to content

Commit

Permalink
scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zhen Lei authored and Martin K. Petersen committed May 15, 2021
1 parent 73578af commit 5cb289b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/qla2xxx/qla_nx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,8 @@ qla82xx_write_flash_dword(struct qla_hw_data *ha, uint32_t flashaddr,
return ret;
}

if (qla82xx_flash_set_write_enable(ha))
ret = qla82xx_flash_set_write_enable(ha);
if (ret < 0)
goto done_write;

qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_WDATA, data);
Expand Down

0 comments on commit 5cb289b

Please sign in to comment.