From: Wei Yongjun <weiyongjun1@huawei.com> To: "Manoj N . Kumar" <manoj@linux.ibm.com>, "Matthew R. Ochs" <mrochs@linux.ibm.com>, Uma Krishnan <ukrishn@linux.ibm.com>, "James E.J. Bottomley" <jejb@linux.ibm.com>, "Martin K. Petersen" <martin.petersen@oracle.com> Cc: Wei Yongjun <weiyongjun1@huawei.com>, linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH -next] scsi: cxlflash: Fix error return code in cxlflash_probe() Date: Tue, 28 Apr 2020 14:18:55 +0000 [thread overview] Message-ID: <20200428141855.88704-1-weiyongjun1@huawei.com> (raw) 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; }
WARNING: multiple messages have this Message-ID (diff)
From: Wei Yongjun <weiyongjun1@huawei.com> To: "Manoj N . Kumar" <manoj@linux.ibm.com>, "Matthew R. Ochs" <mrochs@linux.ibm.com>, Uma Krishnan <ukrishn@linux.ibm.com>, "James E.J. Bottomley" <jejb@linux.ibm.com>, "Martin K. Petersen" <martin.petersen@oracle.com> Cc: Wei Yongjun <weiyongjun1@huawei.com>, <linux-scsi@vger.kernel.org>, <kernel-janitors@vger.kernel.org> Subject: [PATCH -next] scsi: cxlflash: Fix error return code in cxlflash_probe() Date: Tue, 28 Apr 2020 14:18:55 +0000 [thread overview] Message-ID: <20200428141855.88704-1-weiyongjun1@huawei.com> (raw) 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; }
next reply other threads:[~2020-04-28 14:18 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-28 14:18 Wei Yongjun [this message] 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-18 21:41 ` Matthew R. Ochs 2020-05-20 2:30 ` Martin K. Petersen 2020-05-20 2:30 ` Martin K. Petersen
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200428141855.88704-1-weiyongjun1@huawei.com \ --to=weiyongjun1@huawei.com \ --cc=jejb@linux.ibm.com \ --cc=kernel-janitors@vger.kernel.org \ --cc=linux-scsi@vger.kernel.org \ --cc=manoj@linux.ibm.com \ --cc=martin.petersen@oracle.com \ --cc=mrochs@linux.ibm.com \ --cc=ukrishn@linux.ibm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.