]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/mlx5e: Replace kfree with kvfree when free vhca stats
authorMaor Gottlieb <maorg@mellanox.com>
Mon, 16 Sep 2019 10:17:33 +0000 (13:17 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 29 Oct 2019 23:27:18 +0000 (16:27 -0700)
Memory allocated by kvzalloc should be freed by kvfree.

Fixes: 009411e71925 ("net/mlx5e: Add mlx5e HV VHCA stats agent")
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c

index b3a249b2a482fbd65ee6e857c572d66727d4ad45..ac44bbe95c5c1b653366252662fddb54e92188fa 100644 (file)
@@ -141,7 +141,7 @@ int mlx5e_hv_vhca_stats_create(struct mlx5e_priv *priv)
                                    "Failed to create hv vhca stats agent, err = %ld\n",
                                    PTR_ERR(agent));
 
-               kfree(priv->stats_agent.buf);
+               kvfree(priv->stats_agent.buf);
                return IS_ERR_OR_NULL(agent);
        }
 
@@ -157,5 +157,5 @@ void mlx5e_hv_vhca_stats_destroy(struct mlx5e_priv *priv)
                return;
 
        mlx5_hv_vhca_agent_destroy(priv->stats_agent.agent);
-       kfree(priv->stats_agent.buf);
+       kvfree(priv->stats_agent.buf);
 }