RE: [PATCH] scsi: fnic: return error if vmalloc failed

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

 



On Tuesday, November 28, 2023 3:10 AM, Artem Chernyshev <artem.chernyshev@xxxxxxxxxxx> wrote:
>
> In fnic_init_module() exists redundant check for return value from fnic_debugfs_init(), because at moment it only can return zero. It make sense to process theoretical vmalloc failure.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 9730ddfb123d ("scsi: fnic: remove redundant assignment of variable rc")
> Signed-off-by: Artem Chernyshev <artem.chernyshev@xxxxxxxxxxx>
> ---
> drivers/scsi/fnic/fnic_debugfs.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic/fnic_debugfs.c
> index c4d9ed0d7d75..cf2601bf170a 100644
> --- a/drivers/scsi/fnic/fnic_debugfs.c
> +++ b/drivers/scsi/fnic/fnic_debugfs.c
> @@ -52,9 +52,10 @@ int fnic_debugfs_init(void)
> fc_trc_flag->fnic_trace = 2;
> fc_trc_flag->fc_trace = 3;
> fc_trc_flag->fc_clear = 4;
> +             return 0;
> }
>
> -     return 0;
> +     return -ENOMEM;
> }
>
> /*
> --
> 2.37.3

Looks good to me.
Reviewed-by: Karan Tilak Kumar <kartilak@xxxxxxxxx>

Regards,
Karan





[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