net/mlx5e: Initialize link speed to zero
authorRoy Novich <royno@nvidia.com>
Wed, 1 Mar 2023 13:47:11 +0000 (15:47 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 21 Mar 2023 21:06:31 +0000 (14:06 -0700)
commit6e9d51b1a5cb8d750c3daf89db4f4cdfd1051819
tree8c313ae8214e2da08f40b0e680cbdfacfacc2762
parent922f56e9a795d6f3dd72d3428ebdd7ee040fa855
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: 3f6d08d196b2 ("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>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c