From: Saeed Mahameed <saeedm@nvidia.com>
To: Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, Pan Bian <bianpan2016@163.com>,
Leon Romanovsky <leonro@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>
Subject: [net 03/12] net/mlx5e: free page before return
Date: Tue, 26 Jan 2021 15:43:36 -0800 [thread overview]
Message-ID: <20210126234345.202096-4-saeedm@nvidia.com> (raw)
In-Reply-To: <20210126234345.202096-1-saeedm@nvidia.com>
From: Pan Bian <bianpan2016@163.com>
Instead of directly return, goto the error handling label to free
allocated page.
Fixes: 5f29458b77d5 ("net/mlx5e: Support dump callback in TX reporter")
Signed-off-by: Pan Bian <bianpan2016@163.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/health.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/health.c b/drivers/net/ethernet/mellanox/mlx5/core/en/health.c
index 718f8c0a4f6b..84e501e057b4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/health.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/health.c
@@ -273,7 +273,7 @@ int mlx5e_health_rsc_fmsg_dump(struct mlx5e_priv *priv, struct mlx5_rsc_key *key
err = devlink_fmsg_binary_pair_nest_start(fmsg, "data");
if (err)
- return err;
+ goto free_page;
cmd = mlx5_rsc_dump_cmd_create(mdev, key);
if (IS_ERR(cmd)) {
--
2.29.2
next prev parent reply other threads:[~2021-01-27 4:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-26 23:43 [pull request][net 00/12] mlx5 fixes 2021-01-26 Saeed Mahameed
2021-01-26 23:43 ` [net 01/12] net/mlx5: Fix memory leak on flow table creation error flow Saeed Mahameed
2021-01-28 3:30 ` patchwork-bot+netdevbpf
2021-01-28 8:33 ` Saeed Mahameed
2021-01-29 1:37 ` Jakub Kicinski
2021-01-26 23:43 ` [net 02/12] net/mlx5e: E-switch, Fix rate calculation for overflow Saeed Mahameed
2021-01-26 23:43 ` Saeed Mahameed [this message]
2021-01-26 23:43 ` [net 04/12] net/mlx5e: Reduce tc unsupported key print level Saeed Mahameed
2021-01-26 23:43 ` [net 05/12] net/mlx5e: Fix IPSEC stats Saeed Mahameed
2021-01-26 23:43 ` [net 06/12] net/mlx5: Maintain separate page trees for ECPF and PF functions Saeed Mahameed
2021-01-26 23:43 ` [net 07/12] net/mlx5e: Disable hw-tc-offload when MLX5_CLS_ACT config is disabled Saeed Mahameed
2021-01-26 23:43 ` [net 08/12] net/mlx5e: Fix CT rule + encap slow path offload and deletion Saeed Mahameed
2021-01-26 23:43 ` [net 09/12] net/mlx5e: Correctly handle changing the number of queues when the interface is down Saeed Mahameed
2021-01-26 23:43 ` [net 10/12] net/mlx5e: Revert parameters on errors when changing trust state without reset Saeed Mahameed
2021-01-26 23:43 ` [net 11/12] net/mlx5e: Revert parameters on errors when changing MTU and LRO " Saeed Mahameed
2021-01-27 20:00 ` Willem de Bruijn
2021-01-27 23:06 ` Saeed Mahameed
2021-01-26 23:43 ` [net 12/12] net/mlx5: CT: Fix incorrect removal of tuple_nat_node from nat rhashtable Saeed Mahameed
2021-01-27 20:03 ` [pull request][net 00/12] mlx5 fixes 2021-01-26 Willem de Bruijn
2021-01-27 23:08 ` Saeed Mahameed
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=20210126234345.202096-4-saeedm@nvidia.com \
--to=saeedm@nvidia.com \
--cc=bianpan2016@163.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=leonro@nvidia.com \
--cc=netdev@vger.kernel.org \
/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).