From: Cosmin Ratiu Date: Mon, 8 Jul 2024 08:00:25 +0000 (+0300) Subject: net/mlx5e: CT: Initialize err to 0 to avoid warning X-Git-Tag: configfs-6.13-2024-11-19~924^2~60^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f1ac0b7dcd49edf3ea5cc9345fdae70b6c2b199b;p=users%2Fhch%2Fconfigfs.git 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: 49d37d05f216 ("net/mlx5: CT: Separate CT and CT-NAT tuple entries") Signed-off-by: Cosmin Ratiu Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20240708080025.1593555-11-tariqt@nvidia.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c index b49d87a51f21..8cf8ba2622f2 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c @@ -1145,7 +1145,7 @@ mlx5_tc_ct_entry_replace_rules(struct mlx5_tc_ct_priv *ct_priv, struct mlx5_ct_entry *entry, u8 zone_restore_id) { - int err; + int err = 0; if (mlx5_tc_ct_entry_in_ct_table(entry)) { err = mlx5_tc_ct_entry_replace_rule(ct_priv, flow_rule, entry, false,