Skip to contentSkip to conversation

net/mlx5e: free page before return

PATCH Applied Pan Bian 3 participants 3 messages Jan 21, 2021 – Jan 22, 2021

Subsystems (4)
lore
Share & tools
lore

Pan Bian

author
#0 lore raw

PATCH 1/1 net/mlx5e: free page before return

Instead of directly return, goto the error handling label to free allocated page.

Fixes 5f29458b77d5 ("net/mlx5e: Support dump callback in TX reporter")
---
 drivers/net/ethernet/mellanox/mlx5/core/en/health.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en/health.c +1 -1
index 718f8c0a4f6b..84e501e057b4 100644
@@ -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)) {
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · 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")
---
 drivers/net/ethernet/mellanox/mlx5/core/en/health.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks,

#2 lore raw
Quoted 12 lines · Leon Romanovsky
Quoted 10 lines · 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")

---
 drivers/net/ethernet/mellanox/mlx5/core/en/health.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 2 lines

Thanks,

Applied to net-mlx5,
Thanks!