From: Uma Krishnan Date: Wed, 3 Jan 2018 22:55:04 +0000 (-0600) Subject: scsi: cxlflash: Adapter context init can return error X-Git-Tag: v4.19~1382^2~116 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0df69c6024cd089144d3b38f12352899dd4e40b1;p=platform%2Fkernel%2Flinux-rpi.git 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 Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen --- 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; }