Re: [PATCH -next] scsi: cxlflash: Fix error return code in cxlflash_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

Acked-by: Matthew R. Ochs <mrochs@xxxxxxxxxxxxx>

> ---
>  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;
>  	}
> 
> 
> 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux