net/mlx5e: Fix error handling in mlx5e_refresh_tirs
authorSaeed Mahameed <saeedm@nvidia.com>
Sun, 28 May 2023 06:07:08 +0000 (23:07 -0700)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 1 Jun 2023 03:08:37 +0000 (20:08 -0700)
commitb6193d7030e3c59f1d4c75648c9c8fa40cad2bcd
tree01c16a41fcbbf001efe6fbd037085eeef7656065
parent368591995d010e639ad8f28b27f1b721f0872342
net/mlx5e: Fix error handling in mlx5e_refresh_tirs

Allocation failure is outside the critical lock section and should
return immediately rather than jumping to the unlock section.

Also unlock as soon as required and remove the now redundant jump label.

Fixes: 80a2a9026b24 ("net/mlx5e: Add a lock on tir list")
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_common.c