Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1712691
| From | Andrew Donnellan <andrew.donnellan@au1.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] scsi: cxlflash: Fix an error handling path in 'cxlflash_disk_attach()' |
| Date | 2017-08-16 07:40 +0200 |
| Message-ID | <ueZdD-30Q-3@gated-at.bofh.it> (permalink) |
| References | <ueZdD-30Q-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] scsi: cxlflash: Fix an error handling path in 'cxlflash_disk_attach()' Andrew Donnellan <andrew.donnellan@au1.ibm.com> - 2017-08-16 07:40 +0200
csiph-web