From: Christophe JAILLET Date: Thu, 17 May 2018 00:49:01 +0000 (-0700) Subject: net/mlx5: Eswitch, Use 'kvfree()' for memory allocated by 'kvzalloc()' X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e574978ae52a3fb1346bc37de2f2221dd878c065;p=openwrt%2Fstaging%2Fblogic.git net/mlx5: Eswitch, Use 'kvfree()' for memory allocated by 'kvzalloc()' When 'kvzalloc()' is used to allocate memory, 'kvfree()' must be used to free it. Fixes: fed9ce22bf8ae ("net/mlx5: E-Switch, Add API to create vport rx rules") Signed-off-by: Christophe JAILLET Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c index 35e256eb2f6e..b123f8a52ad8 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c @@ -663,7 +663,7 @@ static int esw_create_vport_rx_group(struct mlx5_eswitch *esw) esw->offloads.vport_rx_group = g; out: - kfree(flow_group_in); + kvfree(flow_group_in); return err; }