scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword()
Subsystems (2)
PATCH 1/1 scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
Fixes a9083016a531 ("[SCSI] qla2xxx: Add ISP82XX support.")
Reported-by Hulk Robot <[email protected]>
Signed-off-by Zhen Lei <[email protected]>
--- drivers/scsi/qla2xxx/qla_nx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_nx.c +2 -1
@@ -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);
Signature · 1 line
2.26.0.106.g9fadedd
Quoted 16 lines · Zhen Lei
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
Fixes a9083016a531 ("[SCSI] qla2xxx: Add ISP82XX support.")Reported-by Hulk Robot <[email protected]>Signed-off-by Zhen Lei <[email protected]>--- drivers/scsi/qla2xxx/qla_nx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/scsi/qla2xxx/qla_nx.c +0
-0
drivers/scsi/qla2xxx/qla_nx.c qla82xx_write_flash_dword(struct qla_hw_data *ha, uint32_t flashaddr, · line 1070
Quoted 9 lines
drivers/scsi/qla2xxx/qla_nx.c +2
-1@@ -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);
Makes sense.
Reviewed-by Himanshu Madhani <[email protected]>
Signature · 1 line
Himanshu Madhani Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 2 lines · Zhen Lei
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
Applied to 5.13/scsi-fixes, thanks!
[1/1] scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword()
https://git.kernel.org/mkp/scsi/c/5cb289bf2d7c
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering