Skip to content

Commit 5cb289b

Browse files
Zhen Leimartinkpetersen
authored andcommitted
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. Link: https://lore.kernel.org/r/[email protected] Fixes: a908301 ("[SCSI] qla2xxx: Add ISP82XX support.") Reported-by: Hulk Robot <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Zhen Lei <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 73578af commit 5cb289b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/scsi/qla2xxx/qla_nx.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,8 @@ qla82xx_write_flash_dword(struct qla_hw_data *ha, uint32_t flashaddr,
10631063
return ret;
10641064
}
10651065

1066-
if (qla82xx_flash_set_write_enable(ha))
1066+
ret = qla82xx_flash_set_write_enable(ha);
1067+
if (ret < 0)
10671068
goto done_write;
10681069

10691070
qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_WDATA, data);

0 commit comments

Comments
 (0)