Skip to content

Commit

Permalink
net/mlx5: Remove useless kfree
Browse files Browse the repository at this point in the history
After alloc fail, we do not need to kfree.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
  • Loading branch information
Haowen Bai authored and Saeed Mahameed committed May 3, 2022
1 parent c389362 commit 7134c60
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,6 @@ __mlx5_tc_ct_flow_offload(struct mlx5_tc_ct_priv *ct_priv,

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

Expand Down

0 comments on commit 7134c60

Please sign in to comment.