lkml.org 
[lkml]   [2021]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mlx4: Fix missing error code in mlx4_load_one()
From
Date


On 7/23/2021 1:36 PM, Jiapeng Chong wrote:
> The error code is missing in this code scenario, add the error code
> '-EINVAL' to the return value 'err'.
>
> Eliminate the follow smatch warning:
>
> drivers/net/ethernet/mellanox/mlx4/main.c:3538 mlx4_load_one() warn:
> missing error code 'err'.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Fixes: 7ae0e400cd93 ("net/mlx4_core: Flexible (asymmetric) allocation of
> EQs and MSI-X vectors for PF/VFs")
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> drivers/net/ethernet/mellanox/mlx4/main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
> index 00c8465..28ac469 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/main.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/main.c
> @@ -3535,6 +3535,7 @@ static int mlx4_load_one(struct pci_dev *pdev, int pci_dev_data,
>
> if (!SRIOV_VALID_STATE(dev->flags)) {
> mlx4_err(dev, "Invalid SRIOV state\n");
> + err = -EINVAL;
> goto err_close;
> }
> }
>

Thanks for you patch.
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>

Regards,
Tariq

\
 
 \ /
  Last update: 2021-07-25 08:17    [W:0.107 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site