summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2023-05-29 11:34:59 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2023-06-10 04:40:53 +0300
commit978015f7ef9240acfb078f4c1c0d79459b42f951 (patch)
tree103944223da1cd5b07a7e61284151bda06744759 /drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c
parente71383fb9cd15a28d6c01d2c165a96f1c0bcf418 (diff)
downloadlinux-978015f7ef9240acfb078f4c1c0d79459b42f951.tar.xz
net/mlx5e: Remove a useless function call
'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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c
index 0290e0dea539..4e923a2874ae 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c
@@ -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;