Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1390,6 +1390,7 @@ static int cxlflash_disk_attach(struct scsi_device *sdev,
	if (unlikely(!ctxi)) {
		dev_err(dev, "%s: Failed to create context ctxid=%d\n",
			__func__, ctxid);
		rc = -ENOMEM;
		goto err;
	}