net/mlx5: Lag, Fix for loop when checking lag
authorChris Mi <cmi@nvidia.com>
Tue, 29 Nov 2022 09:30:06 +0000 (01:30 -0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 29 Nov 2022 16:19:59 +0000 (08:19 -0800)
commit0e682f04b4b59eac0b0a030251513589c4607458
tree8646bcc0aa9a171c09a75f996b82f6ec29e61122
parentdda3bbbb26c823cd54d5bf211df7db12147c9392
net/mlx5: Lag, Fix for loop when checking lag

The cited commit adds a for loop to check if each port supports lag
or not. But dev is not initialized correctly. Fix it by initializing
dev for each iteration.

Fixes: e87c6a832f88 ("net/mlx5: E-switch, Fix duplicate lag creation")
Signed-off-by: Chris Mi <cmi@nvidia.com>
Reported-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Link: https://lore.kernel.org/r/20221129093006.378840-2-saeed@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c