linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/mlx5e: free page before return
@ 2021-01-21  4:58 Pan Bian
  2021-01-21 17:49 ` Leon Romanovsky
  0 siblings, 1 reply; 3+ messages in thread
From: Pan Bian @ 2021-01-21  4:58 UTC (permalink / raw)
  To: Saeed Mahameed, Leon Romanovsky, David S. Miller, Jakub Kicinski,
	Aya Levin, Tariq Toukan, Eran Ben Elisha, Moshe Shemesh,
	Moshe Tal, Joe Perches, Jiri Pirko
  Cc: netdev, linux-rdma, linux-kernel, Pan Bian

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>
---
 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.17.1



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

* Re: [PATCH] net/mlx5e: free page before return
  2021-01-21  4:58 [PATCH] net/mlx5e: free page before return Pan Bian
@ 2021-01-21 17:49 ` Leon Romanovsky
  2021-01-22 19:43   ` Saeed Mahameed
  0 siblings, 1 reply; 3+ messages in thread
From: Leon Romanovsky @ 2021-01-21 17:49 UTC (permalink / raw)
  To: Pan Bian
  Cc: Saeed Mahameed, David S. Miller, Jakub Kicinski, Aya Levin,
	Tariq Toukan, Eran Ben Elisha, Moshe Shemesh, Moshe Tal,
	Joe Perches, Jiri Pirko, netdev, linux-rdma, linux-kernel

On Wed, Jan 20, 2021 at 08:58:30PM -0800, Pan Bian wrote:
> 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>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en/health.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

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

* Re: [PATCH] net/mlx5e: free page before return
  2021-01-21 17:49 ` Leon Romanovsky
@ 2021-01-22 19:43   ` Saeed Mahameed
  0 siblings, 0 replies; 3+ messages in thread
From: Saeed Mahameed @ 2021-01-22 19:43 UTC (permalink / raw)
  To: Leon Romanovsky, Pan Bian
  Cc: David S. Miller, Jakub Kicinski, Aya Levin, Tariq Toukan,
	Eran Ben Elisha, Moshe Shemesh, Moshe Tal, Joe Perches,
	Jiri Pirko, netdev, linux-rdma, linux-kernel

On Thu, 2021-01-21 at 19:49 +0200, Leon Romanovsky wrote:
> On Wed, Jan 20, 2021 at 08:58:30PM -0800, Pan Bian wrote:
> > 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>
> > ---
> >  drivers/net/ethernet/mellanox/mlx5/core/en/health.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> 
> Thanks,
> Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

Applied to net-mlx5,
Thanks!


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

end of thread, other threads:[~2021-01-22 22:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-21  4:58 [PATCH] net/mlx5e: free page before return Pan Bian
2021-01-21 17:49 ` Leon Romanovsky
2021-01-22 19:43   ` Saeed Mahameed

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