netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: saeed@kernel.org
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Denis Efremov <efremov@linux.com>,
	Saeed Mahameed <saeedm@nvidia.com>
Subject: [net-next V2 13/15] net/mlx5e: Use kfree() to free fd->g in accel_fs_tcp_create_groups()
Date: Wed, 23 Sep 2020 15:48:22 -0700	[thread overview]
Message-ID: <20200923224824.67340-14-saeed@kernel.org> (raw)
In-Reply-To: <20200923224824.67340-1-saeed@kernel.org>

From: Denis Efremov <efremov@linux.com>

Memory ft->g in accel_fs_tcp_create_groups() is allocaed with kcalloc().
It's excessive to free ft->g with kvfree(). Use kfree() instead.

Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
index 4cdd9eac647d..97f1594cee11 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
@@ -191,7 +191,7 @@ static int accel_fs_tcp_create_groups(struct mlx5e_flow_table *ft,
 	ft->g = kcalloc(MLX5E_ACCEL_FS_TCP_NUM_GROUPS, sizeof(*ft->g), GFP_KERNEL);
 	in = kvzalloc(inlen, GFP_KERNEL);
 	if  (!in || !ft->g) {
-		kvfree(ft->g);
+		kfree(ft->g);
 		kvfree(in);
 		return -ENOMEM;
 	}
-- 
2.26.2


  parent reply	other threads:[~2020-09-23 22:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-23 22:48 [pull request][net-next V2 00/15] mlx5 Connection Tracking in NIC mode saeed
2020-09-23 22:48 ` [net-next V2 01/15] net/mlx5: Refactor multi chains and prios support saeed
2020-09-23 22:48 ` [net-next V2 02/15] net/mlx5: Allow ft level ignore for nic rx tables saeed
2020-09-23 22:48 ` [net-next V2 03/15] net/mlx5e: Tc nic flows to use mlx5_chains flow tables saeed
2020-09-23 22:48 ` [net-next V2 04/15] net/mlx5e: Split nic tc flow allocation and creation saeed
2020-09-23 22:48 ` [net-next V2 05/15] net/mlx5: Refactor tc flow attributes structure saeed
2020-09-23 22:48 ` [net-next V2 06/15] net/mlx5e: Add tc chains offload support for nic flows saeed
2020-09-23 22:48 ` [net-next V2 07/15] net/mlx5e: rework ct offload init messages saeed
2020-09-23 22:48 ` [net-next V2 08/15] net/mlx5e: Support CT offload for tc nic flows saeed
2020-09-23 22:48 ` [net-next V2 09/15] net/mlx5e: CT: Use the same counter for both directions saeed
2020-11-27 14:01   ` Marcelo Ricardo Leitner
2020-12-01 21:41     ` Saeed Mahameed
2020-12-07 10:20       ` Oz Shlomo
2020-12-07 19:19         ` Marcelo Ricardo Leitner
2020-09-23 22:48 ` [net-next V2 10/15] net/mlx5e: TC: Remove unused parameter from mlx5_tc_ct_add_no_trk_match() saeed
2020-09-23 22:48 ` [net-next V2 11/15] net/mlx5e: Keep direct reference to mlx5_core_dev in tc ct saeed
2020-09-23 22:48 ` [net-next V2 12/15] net/mlx5e: IPsec: Use kvfree() for memory allocated with kvzalloc() saeed
2020-09-23 22:48 ` saeed [this message]
2020-09-23 22:48 ` [net-next V2 14/15] net/mlx5: simplify the return expression of mlx5_ec_init() saeed
2020-09-23 22:48 ` [net-next V2 15/15] net/mlx5: remove unreachable return saeed
2020-09-25  2:55 ` [pull request][net-next V2 00/15] mlx5 Connection Tracking in NIC mode David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200923224824.67340-14-saeed@kernel.org \
    --to=saeed@kernel.org \
    --cc=davem@davemloft.net \
    --cc=efremov@linux.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).