Commit 899862b6 authored by Jiri Pirko's avatar Jiri Pirko Committed by Saeed Mahameed

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: default avatarJiri Pirko <jiri@nvidia.com>
Reviewed-by: default avatarShay Drory <shayd@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 0d0946d6
...@@ -3961,9 +3961,6 @@ static int mlx5_esw_query_vport_vhca_id(struct mlx5_eswitch *esw, u16 vport_num, ...@@ -3961,9 +3961,6 @@ static int mlx5_esw_query_vport_vhca_id(struct mlx5_eswitch *esw, u16 vport_num,
int err; int err;
*vhca_id = 0; *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); query_ctx = kzalloc(query_out_sz, GFP_KERNEL);
if (!query_ctx) if (!query_ctx)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment