Skip to content

Commit

Permalink
net/mlx5e: Remove a useless function call
Browse files Browse the repository at this point in the history
'handle' is known to be NULL here. There is no need to kfree() it.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
  • Loading branch information
Christophe JAILLET authored and Saeed Mahameed committed Jun 10, 2023
1 parent e71383f commit 978015f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,8 @@ mlx5e_tc_post_act_add(struct mlx5e_post_act *post_act, struct mlx5_flow_attr *po
int err;

handle = kzalloc(sizeof(*handle), GFP_KERNEL);
if (!handle) {
kfree(handle);
if (!handle)
return ERR_PTR(-ENOMEM);
}

post_attr->chain = 0;
post_attr->prio = 0;
Expand Down

0 comments on commit 978015f

Please sign in to comment.