All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 1/1] net/mlx5e: Fix returning uninitialized err
@ 2022-08-30 12:20 Roi Dayan
  2022-08-31  5:40 ` Roi Dayan
  2022-08-31  6:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Roi Dayan @ 2022-08-30 12:20 UTC (permalink / raw)
  To: netdev
  Cc: Roi Dayan, David S. Miller, Saeed Mahameed, Maor Dickman,
	alexandr.lobakin, dan.carpenter

In the cited commit the function mlx5e_rep_add_meta_tunnel_rule()
was added and in success flow, err was returned uninitialized.
Fix it.

Fixes: 430e2d5e2a98 ("net/mlx5: E-Switch, Move send to vport meta rule creation")
Reported-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index 914bddbfc1d7..e09bca78df75 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -471,22 +471,18 @@ mlx5e_rep_add_meta_tunnel_rule(struct mlx5e_priv *priv)
 	struct mlx5_eswitch_rep *rep = rpriv->rep;
 	struct mlx5_flow_handle *flow_rule;
 	struct mlx5_flow_group *g;
-	int err;
 
 	g = esw->fdb_table.offloads.send_to_vport_meta_grp;
 	if (!g)
 		return 0;
 
 	flow_rule = mlx5_eswitch_add_send_to_vport_meta_rule(esw, rep->vport);
-	if (IS_ERR(flow_rule)) {
-		err = PTR_ERR(flow_rule);
-		goto out;
-	}
+	if (IS_ERR(flow_rule))
+		return PTR_ERR(flow_rule);
 
 	rpriv->send_to_vport_meta_rule = flow_rule;
 
-out:
-	return err;
+	return 0;
 }
 
 static void
-- 
2.34.3


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

end of thread, other threads:[~2022-08-31  6:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-30 12:20 [PATCH net-next 1/1] net/mlx5e: Fix returning uninitialized err Roi Dayan
2022-08-31  5:40 ` Roi Dayan
2022-08-31  6:15   ` Jakub Kicinski
2022-08-31  6:30 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.