From: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
manoj@linux.vnet.ibm.com, mrochs@linux.vnet.ibm.com,
ukrishn@linux.vnet.ibm.com, jejb@linux.vnet.ibm.com,
martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] scsi: cxlflash: Fix an error handling path in 'cxlflash_disk_attach()'
Date: Wed, 16 Aug 2017 15:32:19 +1000 [thread overview]
Message-ID: <0b3495e0-dd8d-3269-39fe-9f29d751f74b@au1.ibm.com> (raw)
In-Reply-To: <20170815201835.781F76A041@b03ledav003.gho.boulder.ibm.com>
On 16/08/17 06:18, Christophe JAILLET wrote:
> 'rc' is known to be 0 at this point.
> If 'create_context()' fails, returns -ENOMEM instead of 0 which means
> success.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
ENOMEM seems right here.
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
> ---
> drivers/scsi/cxlflash/superpipe.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/cxlflash/superpipe.c b/drivers/scsi/cxlflash/superpipe.c
> index ad0f9968ccfb..08da593cb2f6 100644
> --- a/drivers/scsi/cxlflash/superpipe.c
> +++ b/drivers/scsi/cxlflash/superpipe.c
> @@ -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;
> }
>
>
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com IBM Australia Limited
next parent reply other threads:[~2017-08-16 5:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170815201835.781F76A041@b03ledav003.gho.boulder.ibm.com>
2017-08-16 5:32 ` Andrew Donnellan [this message]
2017-08-15 20:18 Christophe JAILLET
2017-08-16 0:21 ` Matthew R. Ochs
2017-08-16 2:11 ` 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=0b3495e0-dd8d-3269-39fe-9f29d751f74b@au1.ibm.com \
--to=andrew.donnellan@au1.ibm.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=jejb@linux.vnet.ibm.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=manoj@linux.vnet.ibm.com \
--cc=martin.petersen@oracle.com \
--cc=mrochs@linux.vnet.ibm.com \
--cc=ukrishn@linux.vnet.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®