Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1715248 > unrolled thread

Re: [PATCH] mlx5: ensure 0 is returned when vport is zero

Started byColin Ian King <colin.king@canonical.com>
First post2017-08-18 17:30 +0200
Last post2017-08-18 17:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] mlx5: ensure 0 is returned when vport is zero Colin Ian King <colin.king@canonical.com> - 2017-08-18 17:30 +0200

#1715248 — Re: [PATCH] mlx5: ensure 0 is returned when vport is zero

FromColin Ian King <colin.king@canonical.com>
Date2017-08-18 17:30 +0200
SubjectRe: [PATCH] mlx5: ensure 0 is returned when vport is zero
Message-ID<ufRnH-5Ai-5@gated-at.bofh.it>
On 18/08/17 16:25, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Currently, if vport is zero then then an uninialized return status
> in err is returned.  Since the only return status at the end of the
> function esw_add_uc_addr is zero for the current set of return paths
> we may as well just return 0 rather than err to fix this issue.
> 
> Detected by CoverityScan, CID#1452698 ("Uninitialized scalar variable")
> 
> Fixes: eeb66cdb6826 ("net/mlx5: Separate between E-Switch and MPFS")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
> index 6d9fb6ac6e9b..c77f4c0c7769 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
> @@ -401,7 +401,7 @@ static int esw_add_uc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr)
>  	esw_debug(esw->dev, "\tADDED UC MAC: vport[%d] %pM fr(%p)\n",
>  		  vport, mac, vaddr->flow_rule);
>  
> -	return err;
> +	return 0;
>  }
>  
>  static int esw_del_uc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr)
> 
Apologies, I accidentally re-sent this by mistake.

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web