net/mlx5e: free page before return
Instead of directly return, goto the error handling label to free
allocated page.
Fixes: 5f29458b77
("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>
This commit is contained in:
parent
1fe3e3166b
commit
258ed19f07
|
@ -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");
|
err = devlink_fmsg_binary_pair_nest_start(fmsg, "data");
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
goto free_page;
|
||||||
|
|
||||||
cmd = mlx5_rsc_dump_cmd_create(mdev, key);
|
cmd = mlx5_rsc_dump_cmd_create(mdev, key);
|
||||||
if (IS_ERR(cmd)) {
|
if (IS_ERR(cmd)) {
|
||||||
|
|
Loading…
Reference in New Issue