Skip to content

Commit

Permalink
net/mlx5e: Use kfree() to free fd->g in accel_fs_tcp_create_groups()
Browse files Browse the repository at this point in the history
Memory ft->g in accel_fs_tcp_create_groups() is allocaed with kcalloc().
It's excessive to free ft->g with kvfree(). Use kfree() instead.

Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
  • Loading branch information
evdenis authored and Saeed Mahameed committed Sep 23, 2020
1 parent 22db4c2 commit e1915a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static int accel_fs_tcp_create_groups(struct mlx5e_flow_table *ft,
ft->g = kcalloc(MLX5E_ACCEL_FS_TCP_NUM_GROUPS, sizeof(*ft->g), GFP_KERNEL);
in = kvzalloc(inlen, GFP_KERNEL);
if (!in || !ft->g) {
kvfree(ft->g);
kfree(ft->g);
kvfree(in);
return -ENOMEM;
}
Expand Down

0 comments on commit e1915a6

Please sign in to comment.