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

From: David Miller
Date: Fri Aug 18 2017 - 19:29:29 EST


From: Colin King <colin.king@xxxxxxxxxxxxx>
Date: Fri, 18 Aug 2017 14:49:25 +0100

> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxx>

Applied to net-next, thanks.