mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-10 14:43:54 +08:00
net/mlx5e: Initialize link speed to zero
mlx5e_port_max_linkspeed does not guarantee value assignment for speed.
Avoid cases where link_speed might be used uninitialized. In case
mlx5e_port_max_linkspeed fails, a default link speed of 50000 will be
used for the calculations.
Fixes: 3f6d08d196
("net/mlx5e: Add RSS support for hairpin")
Signed-off-by: Roy Novich <royno@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Aya Levin <ayal@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
922f56e9a7
commit
6e9d51b1a5
@ -1103,8 +1103,8 @@ static void
|
||||
mlx5e_hairpin_params_init(struct mlx5e_hairpin_params *hairpin_params,
|
||||
struct mlx5_core_dev *mdev)
|
||||
{
|
||||
u32 link_speed = 0;
|
||||
u64 link_speed64;
|
||||
u32 link_speed;
|
||||
|
||||
hairpin_params->mdev = mdev;
|
||||
/* set hairpin pair per each 50Gbs share of the link */
|
||||
|
Loading…
Reference in New Issue
Block a user