Commit 9ff87041 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Martin K. Petersen

scsi: cxlflash: Fix an error handling path in 'cxlflash_disk_attach()'

'rc' is known to be 0 at this point.  If 'create_context()' fails,
returns -ENOMEM instead of 0 which means success.
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent c0e8ed04
...@@ -1390,6 +1390,7 @@ static int cxlflash_disk_attach(struct scsi_device *sdev, ...@@ -1390,6 +1390,7 @@ static int cxlflash_disk_attach(struct scsi_device *sdev,
if (unlikely(!ctxi)) { if (unlikely(!ctxi)) {
dev_err(dev, "%s: Failed to create context ctxid=%d\n", dev_err(dev, "%s: Failed to create context ctxid=%d\n",
__func__, ctxid); __func__, ctxid);
rc = -ENOMEM;
goto err; goto err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment