net/mlx5e: free page before return
authorPan Bian <bianpan2016@163.com>
Thu, 21 Jan 2021 04:58:30 +0000 (20:58 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2021 22:28:49 +0000 (23:28 +0100)
commita1b500010f097172f5a4d3a878a1fa6dec27d541
tree1be84b493f684b8a241d29b74ee6aeb15b01f32d
parent2778913fb080dec00a244faacd2be3f5e7a1e83c
net/mlx5e: free page before return

[ Upstream commit 258ed19f075fbc834fe5d69d8b54983fc11e0d4a ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en/health.c