From: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
To: jejb@linux.ibm.com, martin.petersen@oracle.com,
tianjia.zhang@linux.alibaba.com, arkadiusz@drabczyk.org,
praveenm@chelsio.com, davem@davemloft.net
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
tianjia.zhang@alibaba.com
Subject: [PATCH] scsi: csiostor: Fix wrong return value in csio_hw_prep_fw()
Date: Sun, 2 Aug 2020 19:15:31 +0800 [thread overview]
Message-ID: <20200802111531.5065-1-tianjia.zhang@linux.alibaba.com> (raw)
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
next reply other threads:[~2020-08-02 11:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-02 11:15 Tianjia Zhang [this message]
2020-08-31 17:41 ` [PATCH] scsi: csiostor: Fix wrong return value in csio_hw_prep_fw() Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200802111531.5065-1-tianjia.zhang@linux.alibaba.com \
--to=tianjia.zhang@linux.alibaba.com \
--cc=arkadiusz@drabczyk.org \
--cc=davem@davemloft.net \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=praveenm@chelsio.com \
--cc=tianjia.zhang@alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).