net/mlx5e: free page before return
Subsystems (4)
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")
Signed-off-by Pan Bian <[email protected]>
--- 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
@@ -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
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")Signed-off-by Pan Bian <[email protected]>--- drivers/net/ethernet/mellanox/mlx5/core/en/health.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks,
Reviewed-by Leon Romanovsky <[email protected]>
Saeed Mahameed
AppliedQuoted 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 TXreporter")
Signed-off-by Pan Bian <[email protected]>--- drivers/net/ethernet/mellanox/mlx5/core/en/health.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 2 lines
Thanks,
Reviewed-by Leon Romanovsky <[email protected]>
Applied to net-mlx5,
Thanks!