RE: [EXT] [PATCH] scsi: qedf: Fix return values of the probe function

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

 



Hi Zheyu,
Thanks for the patch.

> -----Original Message-----
> From: Zheyu Ma <zheyuma97@xxxxxxxxx>
> Sent: Wednesday, October 20, 2021 8:03 PM
> To: jejb@xxxxxxxxxxxxx; martin.petersen@xxxxxxxxxx; Saurav Kashyap
> <skashyap@xxxxxxxxxxx>; Javed Hasan <jhasan@xxxxxxxxxxx>; GR-QLogic-
> Storage-Upstream <GR-QLogic-Storage-Upstream@xxxxxxxxxxx>
> Cc: linux-scsi@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Zheyu Ma
> <zheyuma97@xxxxxxxxx>
> Subject: [EXT] [PATCH] scsi: qedf: Fix return values of the probe function
> 
> External Email
> 
> ----------------------------------------------------------------------
> qedf_set_fcoe_pf_param() propagates the return value to the probe
> function __qedf_probe() and then hits local_pci_probe().
> 
> During the process of driver probing, the probe function should return < 0
> for failure, otherwise, the kernel will treat value > 0 as success.
> 
> Signed-off-by: Zheyu Ma <zheyuma97@xxxxxxxxx>
> ---
>  drivers/scsi/qedf/qedf_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
> index 42d0d941dba5..52f2a52bea2c 100644
> --- a/drivers/scsi/qedf/qedf_main.c
> +++ b/drivers/scsi/qedf/qedf_main.c
> @@ -3161,14 +3161,14 @@ static int qedf_set_fcoe_pf_param(struct qedf_ctx
> *qedf)
> 
>  	if (!qedf->p_cpuq) {
>  		QEDF_ERR(&(qedf->dbg_ctx), "dma_alloc_coherent failed.\n");
> -		return 1;
> +		return -ENOMEM;
>  	}
> 
>  	rval = qedf_alloc_global_queues(qedf);
>  	if (rval) {
>  		QEDF_ERR(&(qedf->dbg_ctx), "Global queue allocation "
>  			  "failed.\n");
> -		return 1;
> +		return rval;
>  	}
> 
>  	/* Calculate SQ PBL size in the same manner as in qedf_sq_alloc() */
> --
> 2.17.6

Acked-by: Saurav Kashyap <skashyap@xxxxxxxxxxx>

Thanks,
~Saurav




[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