mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 08:58:07 +00:00
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>
This commit is contained in:
parent
8762353106
commit
0df69c6024
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue