1 From foo@baz Mon Apr 15 07:47:06 CEST 2019
2 From: Gavi Teitz <gavi@mellanox.com>
3 Date: Mon, 11 Mar 2019 11:56:34 +0200
4 Subject: net/mlx5e: Fix error handling when refreshing TIRs
6 From: Gavi Teitz <gavi@mellanox.com>
8 [ Upstream commit bc87a0036826a37b43489b029af8143bd07c6cca ]
10 Previously, a false positive would be caught if the TIRs list is
11 empty, since the err value was initialized to -ENOMEM, and was only
12 updated if a TIR is refreshed. This is resolved by initializing the
15 Fixes: b676f653896a ("net/mlx5e: Refactor refresh TIRs")
16 Signed-off-by: Gavi Teitz <gavi@mellanox.com>
17 Reviewed-by: Roi Dayan <roid@mellanox.com>
18 Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 drivers/net/ethernet/mellanox/mlx5/core/en_common.c | 6 ++++--
22 1 file changed, 4 insertions(+), 2 deletions(-)
24 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_common.c
25 +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_common.c
26 @@ -140,15 +140,17 @@ int mlx5e_refresh_tirs(struct mlx5e_priv
28 struct mlx5_core_dev *mdev = priv->mdev;
29 struct mlx5e_tir *tir;
36 inlen = MLX5_ST_SZ_BYTES(modify_tir_in);
37 in = kvzalloc(inlen, GFP_KERNEL);
45 MLX5_SET(modify_tir_in, in, ctx.self_lb_block,