* [PATCH] scsi: csiostor: Fix wrong return value in csio_hw_prep_fw()
@ 2020-08-02 11:15 Tianjia Zhang
2020-08-31 17:41 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Tianjia Zhang @ 2020-08-02 11:15 UTC (permalink / raw)
To: jejb, martin.petersen, tianjia.zhang, arkadiusz, praveenm, davem
Cc: linux-scsi, linux-kernel, tianjia.zhang
On an error exit path, a negative error code should be returned
instead of a positive return value.
Fixes: f40e74ffa3de4 ("csiostor:firmware upgrade fix")
Cc: Praveen Madhavan <praveenm@chelsio.com>
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
---
drivers/scsi/csiostor/csio_hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c
index 950f9cdf0577..5d0f42031d12 100644
--- a/drivers/scsi/csiostor/csio_hw.c
+++ b/drivers/scsi/csiostor/csio_hw.c
@@ -2384,7 +2384,7 @@ static int csio_hw_prep_fw(struct csio_hw *hw, struct fw_info *fw_info,
FW_HDR_FW_VER_MICRO_G(c), FW_HDR_FW_VER_BUILD_G(c),
FW_HDR_FW_VER_MAJOR_G(k), FW_HDR_FW_VER_MINOR_G(k),
FW_HDR_FW_VER_MICRO_G(k), FW_HDR_FW_VER_BUILD_G(k));
- ret = EINVAL;
+ ret = -EINVAL;
goto bye;
}
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: csiostor: Fix wrong return value in csio_hw_prep_fw()
2020-08-02 11:15 [PATCH] scsi: csiostor: Fix wrong return value in csio_hw_prep_fw() Tianjia Zhang
@ 2020-08-31 17:41 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2020-08-31 17:41 UTC (permalink / raw)
To: davem, jejb, arkadiusz, praveenm, Tianjia Zhang
Cc: Martin K . Petersen, linux-scsi, tianjia.zhang, linux-kernel
On Sun, 2 Aug 2020 19:15:31 +0800, Tianjia Zhang wrote:
> On an error exit path, a negative error code should be returned
> instead of a positive return value.
Applied to 5.10/scsi-queue, thanks!
[1/1] scsi: csiostor: Fix wrong return value in csio_hw_prep_fw()
https://git.kernel.org/mkp/scsi/c/44f4daf8678a
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-31 17:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-02 11:15 [PATCH] scsi: csiostor: Fix wrong return value in csio_hw_prep_fw() Tianjia Zhang
2020-08-31 17:41 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).