From: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
To: linux-scsi@vger.kernel.org,
James Bottomley <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"Matthew R. Ochs" <mrochs@linux.vnet.ibm.com>,
"Manoj N. Kumar" <manoj@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org,
Andrew Donnellan <andrew.donnellan@au1.ibm.com>,
Frederic Barrat <fbarrat@linux.vnet.ibm.com>,
Christophe Lombard <clombard@linux.vnet.ibm.com>
Subject: [PATCH 5/6] cxlflash: Adapter context init can return error
Date: Wed, 3 Jan 2018 16:55:04 -0600 [thread overview]
Message-ID: <1515020104-43758-1-git-send-email-ukrishn@linux.vnet.ibm.com> (raw)
In-Reply-To: <1515020002-43551-1-git-send-email-ukrishn@linux.vnet.ibm.com>
Adapter context creation can return either NULL or an error pointer.
Updating the check condition to reflect this.
Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
---
drivers/scsi/cxlflash/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
index b6cadeb..32014e8 100644
--- a/drivers/scsi/cxlflash/main.c
+++ b/drivers/scsi/cxlflash/main.c
@@ -1992,7 +1992,7 @@ static int init_mc(struct cxlflash_cfg *cfg, u32 index)
ctx = cxl_get_context(cfg->dev);
else
ctx = cxl_dev_context_init(cfg->dev);
- if (unlikely(!ctx)) {
+ if (IS_ERR_OR_NULL(ctx)) {
rc = -ENOMEM;
goto err1;
}
--
2.1.0
next prev parent reply other threads:[~2018-01-03 22:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 22:53 [PATCH 0/6] cxlflash: Miscellaneous patches Uma Krishnan
2018-01-03 22:54 ` [PATCH 1/6] cxlflash: Reset command ioasc Uma Krishnan
2018-01-04 6:33 ` Andrew Donnellan
2018-01-07 19:36 ` Matthew R. Ochs
2018-01-08 16:43 ` Uma Krishnan
2018-01-08 16:59 ` Uma Krishnan
2018-01-07 19:27 ` Matthew R. Ochs
2018-01-03 22:54 ` [PATCH 2/6] cxlflash: Update cxl-specific arguments to generic cookie Uma Krishnan
2018-01-07 19:40 ` Matthew R. Ochs
2018-01-03 22:54 ` [PATCH 3/6] cxlflash: Explicitly cache number of interrupts per context Uma Krishnan
2018-01-03 22:54 ` [PATCH 4/6] cxlflash: Remove embedded CXL work structures Uma Krishnan
2018-01-03 22:55 ` Uma Krishnan [this message]
2018-01-07 19:42 ` [PATCH 5/6] cxlflash: Adapter context init can return error Matthew R. Ochs
2018-01-03 22:55 ` [PATCH 6/6] cxlflash: Staging to support future accelerators Uma Krishnan
2018-01-09 3:07 ` [PATCH 0/6] cxlflash: Miscellaneous patches 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=1515020104-43758-1-git-send-email-ukrishn@linux.vnet.ibm.com \
--to=ukrishn@linux.vnet.ibm.com \
--cc=andrew.donnellan@au1.ibm.com \
--cc=clombard@linux.vnet.ibm.com \
--cc=fbarrat@linux.vnet.ibm.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=manoj@linux.vnet.ibm.com \
--cc=martin.petersen@oracle.com \
--cc=mrochs@linux.vnet.ibm.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).