diff options
author | Uma Krishnan <ukrishn@linux.vnet.ibm.com> | 2018-01-03 23:55:04 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-01-11 05:24:57 +0100 |
commit | 0df69c6024cd089144d3b38f12352899dd4e40b1 (patch) | |
tree | d3bfce88b965240609d01bd32419ee1f3eec6d78 | |
parent | scsi: cxlflash: Remove embedded CXL work structures (diff) | |
download | linux-0df69c6024cd089144d3b38f12352899dd4e40b1.tar.xz linux-0df69c6024cd089144d3b38f12352899dd4e40b1.zip |
scsi: cxlflash: Adapter context init can return error
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>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/cxlflash/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index b6cadebbfa94..32014e88cdb1 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; } |