net/mlx5e: Fix error handling when refreshing TIRs
authorGavi Teitz <gavi@mellanox.com>
Mon, 11 Mar 2019 09:56:34 +0000 (11:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2019 06:37:48 +0000 (08:37 +0200)
commit7143c8997ae84bbed8d8698fd317d537b5c3e23d
treee8e225a4b04ca6d785b98fa3196f0987fd8c93c2
parent16b7142372d82cb93099e050559967517b84ac6a
net/mlx5e: Fix error handling when refreshing TIRs

[ Upstream commit bc87a0036826a37b43489b029af8143bd07c6cca ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en_common.c