]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Bridge, fix uninitialized variable usage
authorVlad Buslov <vladbu@nvidia.com>
Wed, 18 Aug 2021 11:19:13 +0000 (14:19 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 7 Sep 2021 21:16:42 +0000 (14:16 -0700)
commit76c4333a7121c7e94ee52df20e52fccc933a9941
tree06af4ed3e7807ea2a804c3782d2629f2d9a2f4ec
parent1e5a6691ac9972ae2a0a9bc4c1d4cfb3abb51a7a
net/mlx5: Bridge, fix uninitialized variable usage

In some conditions variable 'err' is not assigned with value in
mlx5_esw_bridge_port_obj_attr_set() and mlx5_esw_bridge_port_changeupper()
functions after recent changes to support LAG. Initialize the variable with
zero value in both cases.

Reported-by: Colin King <colin.king@canonical.com>
Reported-by: Tim Gardner <tim.gardner@canonical.com>
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
CC: linux-kernel@vger.kernel.org
Fixes: 94ba976b907d ("net/mlx5: Bridge, support LAG")
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c