Skip to content

Commit f1ac0b7

Browse files
Cosmin Ratiukuba-moo
authored andcommitted
net/mlx5e: CT: Initialize err to 0 to avoid warning
It is theoretically possible to return bogus uninitialized values from mlx5_tc_ct_entry_replace_rules, even though in practice this will never be the case as the flow rule will be part of at least the regular ct table or the ct nat table, if not both. But to reduce noise, initialize err to 0. Fixes: 49d37d0 ("net/mlx5: CT: Separate CT and CT-NAT tuple entries") Signed-off-by: Cosmin Ratiu <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 7204730 commit f1ac0b7

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/en

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ mlx5_tc_ct_entry_replace_rules(struct mlx5_tc_ct_priv *ct_priv,
11451145
struct mlx5_ct_entry *entry,
11461146
u8 zone_restore_id)
11471147
{
1148-
int err;
1148+
int err = 0;
11491149

11501150
if (mlx5_tc_ct_entry_in_ct_table(entry)) {
11511151
err = mlx5_tc_ct_entry_replace_rule(ct_priv, flow_rule, entry, false,

0 commit comments

Comments
 (0)