aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhen Lei <[email protected]>2021-05-14 17:09:52 +0800
committerMartin K. Petersen <[email protected]>2021-05-15 17:20:28 -0400
commit5cb289bf2d7c34ca1abd794ce116c4f19185a1d4 (patch)
tree6c7985908d0b9d854e5e164ff87ec100f5dd8204
parent73578af92a0fae6609b955fcc9113e50e413c80f (diff)
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: a9083016a531 ("[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]>
-rw-r--r--drivers/scsi/qla2xxx/qla_nx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index 0677295957bc..615e44af1ca6 100644
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -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);