public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: Uninitialized variable in esw_add_uc_addr()
@ 2017-08-09 21:28 Dan Carpenter
  2017-08-10 11:21 ` Leon Romanovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-08-09 21:28 UTC (permalink / raw)
  To: Saeed Mahameed; +Cc: Matan Barak, Leon Romanovsky, linux-rdma, kernel-janitors

"err" isn't initialized if we hit the "goto fdb_add;".

Fixes: eeb66cdb6826 ("net/mlx5: Separate between E-Switch and MPFS")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
index fd51f0ea8df9..baed45c0dabe 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
@@ -376,7 +376,7 @@ static int esw_add_uc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr)
 {
 	u8 *mac = vaddr->node.addr;
 	u32 vport = vaddr->vport;
-	int err;
+	int err = 0;
 
 	/* Skip mlx5_mpfs_add_mac for PFs,
 	 * it is already done by the PF netdev in mlx5e_execute_l2_action

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-10 11:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-09 21:28 [PATCH] net/mlx5: Uninitialized variable in esw_add_uc_addr() Dan Carpenter
2017-08-10 11:21 ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox