net/mlx5e: Fix error handling when refreshing TIRs
authorGavi Teitz <gavi@mellanox.com>
Mon, 11 Mar 2019 09:56:34 +0000 (11:56 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 29 Mar 2019 19:24:41 +0000 (12:24 -0700)
commitbc87a0036826a37b43489b029af8143bd07c6cca
tree2a5e2b769124112c635cd63cada4f9f11385c797
parente8b26b2135dedc0284490bfeac06dfc4418d0105
net/mlx5e: Fix error handling when refreshing TIRs

Previously, a false positive would be caught if the TIRs list is
empty, since the err value was initialized to -ENOMEM, and was only
updated if a TIR is refreshed. This is resolved by initializing the
err value to zero.

Fixes: b676f653896a ("net/mlx5e: Refactor refresh TIRs")
Signed-off-by: Gavi Teitz <gavi@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_common.c