]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
net/mlx5e: Remove redundant assignment of counter to null
authorRoi Dayan <roid@nvidia.com>
Mon, 26 Jul 2021 12:13:35 +0000 (15:13 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 3 Aug 2021 02:26:29 +0000 (19:26 -0700)
counter is being initialized before being used.

Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

index 472c0c756a69280b41b40b377f9cf8824c05f6bc..980a668bbc3cfdef4b9ea0fe26599198a7aab57a 100644 (file)
@@ -1037,7 +1037,7 @@ mlx5e_tc_add_nic_flow(struct mlx5e_priv *priv,
        struct mlx5e_tc_flow_parse_attr *parse_attr;
        struct mlx5_flow_attr *attr = flow->attr;
        struct mlx5_core_dev *dev = priv->mdev;
-       struct mlx5_fc *counter = NULL;
+       struct mlx5_fc *counter;
        int err;
 
        parse_attr = attr->parse_attr;
@@ -1361,9 +1361,9 @@ mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv,
        bool vf_tun = false, encap_valid = true;
        struct net_device *encap_dev = NULL;
        struct mlx5_esw_flow_attr *esw_attr;
-       struct mlx5_fc *counter = NULL;
        struct mlx5e_rep_priv *rpriv;
        struct mlx5e_priv *out_priv;
+       struct mlx5_fc *counter;
        u32 max_prio, max_chain;
        int err = 0;
        int out_index;