net/mlx5e: Verify dev is present in some ndos
authorRoi Dayan <roid@nvidia.com>
Wed, 16 Sep 2020 07:11:26 +0000 (10:11 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 16 Mar 2021 23:48:40 +0000 (16:48 -0700)
commit2ff349c5edfe3ea3c017dab28a1912f337a6500c
treea6b60d2890ad6c1d18dfce21dffe6a6be5c5bc3b
parentc97a2c06919ae8cf09773b8dfa24909ccfba9316
net/mlx5e: Verify dev is present in some ndos

We will re-use the native NIC port net device instance for the Uplink
representor. While changing profiles private resources are not
available but some ndos are not checking if the netdev is present.
So for those ndos check the netdev is present in the driver before
accessing the private resources.

Signed-off-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c