Commit 5dfb6335 authored by Maor Gottlieb's avatar Maor Gottlieb Committed by Saeed Mahameed

net/mlx5e: Replace kfree with kvfree when free vhca stats

Memory allocated by kvzalloc should be freed by kvfree.

Fixes: cef35af3 ("net/mlx5e: Add mlx5e HV VHCA stats agent")
Signed-off-by: default avatarMaor Gottlieb <maorg@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent 752d3dc0
......@@ -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);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment