As xa_get_mark() returns false in case the entry is not present,
no need to redundantly check if vport is present. Remove the lookup.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
 
 static bool mlx5_esw_check_port_type(struct mlx5_eswitch *esw, u16 vport_num, xa_mark_t mark)
 {
-       struct mlx5_vport *vport;
-
-       vport = mlx5_eswitch_get_vport(esw, vport_num);
-       if (IS_ERR(vport))
-               return false;
-
        return xa_get_mark(&esw->vports, vport_num, mark);
 }