From: Wei Yongjun <weiyongjun1@huawei.com>
To: <weiyongjun1@huawei.com>, James Smart <jsmart2021@gmail.com>,
James Smart <james.smart@broadcom.com>,
Ram Vegesna <ram.vegesna@broadcom.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Daniel Wagner <dwagner@suse.de>, Hannes Reinecke <hare@suse.de>
Cc: <linux-scsi@vger.kernel.org>, <target-devel@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>, Hulk Robot <hulkci@huawei.com>
Subject: [PATCH -next] scsi: elx: efct: Fix error handling in efct_hw_init()
Date: Thu, 17 Jun 2021 02:48:37 +0000 [thread overview]
Message-ID: <20210617024837.1023069-1-weiyongjun1@huawei.com> (raw)
Fix to return negative error code -ENOMEM from the error handling
case instead of 0, also fix typo in error message.
Fixes: 4df84e846624 ("scsi: elx: efct: Driver initialization routines")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/scsi/elx/efct/efct_hw.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/elx/efct/efct_hw.c b/drivers/scsi/elx/efct/efct_hw.c
index ce4736c41564..6324683f9e8e 100644
--- a/drivers/scsi/elx/efct/efct_hw.c
+++ b/drivers/scsi/elx/efct/efct_hw.c
@@ -1044,8 +1044,8 @@ efct_hw_init(struct efct_hw *hw)
*/
hw->wq_reqtag_pool = efct_hw_reqtag_pool_alloc(hw);
if (!hw->wq_reqtag_pool) {
- efc_log_err(hw->os, "efct_hw_reqtag_init failed %d\n", rc);
- return rc;
+ efc_log_err(hw->os, "efct_hw_reqtag_pool_alloc failed\n");
+ return -ENOMEM;
}
rc = efct_hw_setup_io(hw);
next reply other threads:[~2021-06-17 2:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 2:48 Wei Yongjun [this message]
2021-06-18 22:51 ` [PATCH -next] scsi: elx: efct: Fix error handling in efct_hw_init() James Smart
2021-06-19 2:29 ` 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=20210617024837.1023069-1-weiyongjun1@huawei.com \
--to=weiyongjun1@huawei.com \
--cc=dwagner@suse.de \
--cc=hare@suse.de \
--cc=hulkci@huawei.com \
--cc=james.smart@broadcom.com \
--cc=jejb@linux.ibm.com \
--cc=jsmart2021@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=ram.vegesna@broadcom.com \
--cc=target-devel@vger.kernel.org \
/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