linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] scsi: cxlflash: Fix error return code in cxlflash_probe()
@ 2020-04-28 14:18 Wei Yongjun
  2020-05-18 21:41 ` Matthew R. Ochs
  2020-05-20  2:30 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2020-04-28 14:18 UTC (permalink / raw)
  To: Manoj N . Kumar, Matthew R. Ochs, Uma Krishnan,
	James E.J. Bottomley, Martin K. Petersen
  Cc: Wei Yongjun, linux-scsi, kernel-janitors

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 <weiyongjun1@huawei.com>
---
 drivers/scsi/cxlflash/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
index fbd2ae40dab4..fcc5aa9f6014 100644
--- a/drivers/scsi/cxlflash/main.c
+++ b/drivers/scsi/cxlflash/main.c
@@ -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;
 	}




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] scsi: cxlflash: Fix error return code in cxlflash_probe()
  2020-04-28 14:18 [PATCH -next] scsi: cxlflash: Fix error return code in cxlflash_probe() Wei Yongjun
@ 2020-05-18 21:41 ` Matthew R. Ochs
  2020-05-20  2:30 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Matthew R. Ochs @ 2020-05-18 21:41 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: Manoj N . Kumar, Uma Krishnan, James E.J. Bottomley,
	Martin K. Petersen, linux-scsi, kernel-janitors

On Tue, Apr 28, 2020 at 02:18:55PM +0000, Wei Yongjun wrote:
> 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 <weiyongjun1@huawei.com>

Acked-by: Matthew R. Ochs <mrochs@linux.ibm.com>

> ---
>  drivers/scsi/cxlflash/main.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
> index fbd2ae40dab4..fcc5aa9f6014 100644
> --- a/drivers/scsi/cxlflash/main.c
> +++ b/drivers/scsi/cxlflash/main.c
> @@ -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;
>  	}
> 
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] scsi: cxlflash: Fix error return code in cxlflash_probe()
  2020-04-28 14:18 [PATCH -next] scsi: cxlflash: Fix error return code in cxlflash_probe() Wei Yongjun
  2020-05-18 21:41 ` Matthew R. Ochs
@ 2020-05-20  2:30 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2020-05-20  2:30 UTC (permalink / raw)
  To: Manoj N . Kumar, Uma Krishnan, James E.J. Bottomley, Wei Yongjun,
	Matthew R. Ochs
  Cc: Martin K . Petersen, kernel-janitors, linux-scsi

On Tue, 28 Apr 2020 14:18:55 +0000, Wei Yongjun wrote:

> Fix to return negative error code -ENOMEM from create_afu error
> 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

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-20  2:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 14:18 [PATCH -next] scsi: cxlflash: Fix error return code in cxlflash_probe() Wei Yongjun
2020-05-18 21:41 ` Matthew R. Ochs
2020-05-20  2:30 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).