scsi: cxlflash: Fix error return code in cxlflash_probe()
Subsystems (2)
PATCH 1/1 scsi: cxlflash: Fix error return code in cxlflash_probe()
Fix to return negative error code -ENOMEM from create_afu error handling case instead of 0, as done elsewhere in this function.
Signed-off-by Wei Yongjun <[email protected]>
--- drivers/scsi/cxlflash/main.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/cxlflash/main.c +1 -0
@@ -3744,6 +3744,7 @@ static int cxlflash_probe(struct pci_dev *pdev, cfg->afu_cookie = cfg->ops->create_afu (pdev);if (unlikely (!cfg->afu_cookie)) {dev_err (dev,"%s: create_afu failed\n" , __func__); + rc = -ENOMEM ; goto out_remove; }
Quoted 4 lines · Wei Yongjun
Fix to return negative error code
-ENOMEMfromcreate_afuerror handling case instead of 0, as done elsewhere in this function.Signed-off-by Wei Yongjun <[email protected]>
Acked-by Matthew R. Ochs <[email protected]>
Quoted 18 lines
--- drivers/scsi/cxlflash/main.c | 1 + 1 file changed, 1 insertion(+)drivers/scsi/cxlflash/main.c +1
-0@@ -3744,6 +3744,7 @@ static int cxlflash_probe(struct pci_dev *pdev, cfg->afu_cookie = cfg->ops->create_afu (pdev);if (unlikely (!cfg->afu_cookie)) {dev_err (dev,"%s: create_afu failed\n" , __func__); + rc = -ENOMEM ; goto out_remove; }
Martin K. Petersen
AppliedQuoted 2 lines · Wei Yongjun
Fix to return negative error code
-ENOMEMfromcreate_afuerror handling case instead of 0, as done elsewhere in this function.
Applied to 5.8/scsi-queue, thanks!
[1/1] scsi: cxlflash: Fix error return code in cxlflash_probe()
https://git.kernel.org/mkp/scsi/c/d0b1e4a638d6
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering