Netdev List
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: Remove useless kfree
@ 2022-04-22  6:08 Haowen Bai
  2022-04-26 20:05 ` Saeed Mahameed
  0 siblings, 1 reply; 2+ messages in thread
From: Haowen Bai @ 2022-04-22  6:08 UTC (permalink / raw)
  To: Saeed Mahameed, Leon Romanovsky, David S. Miller, Jakub Kicinski,
	Paolo Abeni
  Cc: Haowen Bai, netdev, linux-rdma, linux-kernel

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(-)

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);
 	}
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net/mlx5: Remove useless kfree
  2022-04-22  6:08 [PATCH] net/mlx5: Remove useless kfree Haowen Bai
@ 2022-04-26 20:05 ` Saeed Mahameed
  0 siblings, 0 replies; 2+ messages in thread
From: Saeed Mahameed @ 2022-04-26 20:05 UTC (permalink / raw)
  To: Haowen Bai
  Cc: Saeed Mahameed, Leon Romanovsky, David S. Miller, Jakub Kicinski,
	Paolo Abeni, netdev, linux-rdma, linux-kernel

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!



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-26 20:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-22  6:08 [PATCH] net/mlx5: Remove useless kfree Haowen Bai
2022-04-26 20:05 ` Saeed Mahameed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox