Skip to content

Commit

Permalink
net/mlx5: Remove redundant check from mlx5_esw_query_vport_vhca_id()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Pirko authored and Saeed Mahameed committed Jun 23, 2023
1 parent 0d0946d commit 899862b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
Original file line number Diff line number Diff line change
Expand Up @@ -3961,9 +3961,6 @@ static int mlx5_esw_query_vport_vhca_id(struct mlx5_eswitch *esw, u16 vport_num,
int err;

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

query_ctx = kzalloc(query_out_sz, GFP_KERNEL);
if (!query_ctx)
Expand Down

0 comments on commit 899862b

Please sign in to comment.