All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword()
@ 2021-05-14  9:09 Zhen Lei
  2021-05-14 14:00 ` Himanshu Madhani
  2021-05-15 22:14 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Zhen Lei @ 2021-05-14  9:09 UTC (permalink / raw)
  To: Nilesh Javali, GR-QLogic-Storage-Upstream,
	James E . J . Bottomley, Martin K . Petersen, Giridhar Malavali,
	linux-scsi
  Cc: 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 <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/scsi/qla2xxx/qla_nx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index 0677295957bc5cb..615e44af1ca6043 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);
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword()
  2021-05-14  9:09 [PATCH 1/1] scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword() Zhen Lei
@ 2021-05-14 14:00 ` Himanshu Madhani
  2021-05-15 22:14 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Himanshu Madhani @ 2021-05-14 14:00 UTC (permalink / raw)
  To: Zhen Lei, Nilesh Javali, GR-QLogic-Storage-Upstream,
	James E . J . Bottomley, Martin K . Petersen, Giridhar Malavali,
	linux-scsi

On 5/14/21 4:09 AM, Zhen Lei wrote:
> 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 <hulkci@huawei.com>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>   drivers/scsi/qla2xxx/qla_nx.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
> index 0677295957bc5cb..615e44af1ca6043 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);
> 

Makes sense.

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>


-- 
Himanshu Madhani                               Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword()
  2021-05-14  9:09 [PATCH 1/1] scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword() Zhen Lei
  2021-05-14 14:00 ` Himanshu Madhani
@ 2021-05-15 22:14 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-05-15 22:14 UTC (permalink / raw)
  To: Zhen Lei, Giridhar Malavali, James E . J . Bottomley, linux-scsi,
	GR-QLogic-Storage-Upstream, Nilesh Javali
  Cc: Martin K . Petersen

On Fri, 14 May 2021 17:09:52 +0800, Zhen Lei wrote:

> 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

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-15 22:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14  9:09 [PATCH 1/1] scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword() Zhen Lei
2021-05-14 14:00 ` Himanshu Madhani
2021-05-15 22:14 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.