scsi: cxlflash: Fix error return code in cxlflash_probe()
[ Upstream commit d0b1e4a638
]
Fix to return negative error code -ENOMEM from create_afu error handling
case instead of 0, as done elsewhere in this function.
Link: https://lore.kernel.org/r/20200428141855.88704-1-weiyongjun1@huawei.com
Acked-by: Matthew R. Ochs <mrochs@linux.ibm.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
5.4-rM2-2.2.x-imx-squashed
parent
af02933d59
commit
196d14cea6
|
@ -3746,6 +3746,7 @@ static int cxlflash_probe(struct pci_dev *pdev,
|
||||||
cfg->afu_cookie = cfg->ops->create_afu(pdev);
|
cfg->afu_cookie = cfg->ops->create_afu(pdev);
|
||||||
if (unlikely(!cfg->afu_cookie)) {
|
if (unlikely(!cfg->afu_cookie)) {
|
||||||
dev_err(dev, "%s: create_afu failed\n", __func__);
|
dev_err(dev, "%s: create_afu failed\n", __func__);
|
||||||
|
rc = -ENOMEM;
|
||||||
goto out_remove;
|
goto out_remove;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue