mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
net/mlx5e: E-Switch, Allow get vport api if esw exists
We could have an esw manager device which is not a vport group manager. Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Maor Dickman <maord@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
c97c9fe48a
commit
99db5669f6
|
|
@ -92,7 +92,7 @@ mlx5_eswitch_get_vport(struct mlx5_eswitch *esw, u16 vport_num)
|
|||
{
|
||||
struct mlx5_vport *vport;
|
||||
|
||||
if (!esw || !MLX5_CAP_GEN(esw->dev, vport_group_manager))
|
||||
if (!esw)
|
||||
return ERR_PTR(-EPERM);
|
||||
|
||||
vport = xa_load(&esw->vports, vport_num);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user