Skip to content

Commit 899862b

Browse files
Jiri PirkoSaeed Mahameed
authored andcommitted
net/mlx5: Remove redundant check from mlx5_esw_query_vport_vhca_id()
Since mlx5_esw_query_vport_vhca_id() could be called either from mlx5_esw_vport_enable() or mlx5_esw_vport_disable() where the the check is done, this is always false here. Remove the redundant check. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Shay Drory <shayd@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
1 parent 0d0946d commit 899862b

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3961,9 +3961,6 @@ static int mlx5_esw_query_vport_vhca_id(struct mlx5_eswitch *esw, u16 vport_num,
39613961
int err;
39623962

39633963
*vhca_id = 0;
3964-
if (mlx5_esw_is_manager_vport(esw, vport_num) ||
3965-
!MLX5_CAP_GEN(esw->dev, vhca_resource_manager))
3966-
return -EPERM;
39673964

39683965
query_ctx = kzalloc(query_out_sz, GFP_KERNEL);
39693966
if (!query_ctx)

0 commit comments

Comments
 (0)