diff mbox series

net/mlx5: Remove useless kfree

Message ID 1650607713-23409-1-git-send-email-baihaowen@meizu.com (mailing list archive)
State Not Applicable
Headers show
Series net/mlx5: Remove useless kfree | expand

Commit Message

baihaowen April 22, 2022, 6:08 a.m. UTC
After alloc fail, we do not need to kfree.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Saeed Mahameed April 26, 2022, 8:05 p.m. UTC | #1
On 22 Apr 14:08, Haowen Bai wrote:
>After alloc fail, we do not need to kfree.
>
>Signed-off-by: Haowen Bai <baihaowen@meizu.com>
applied to net-next-mlx5, thanks!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
index e49f51124c74..89aa0208b5d2 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
@@ -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);
 	}