summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDragos Tatulea <dtatulea@nvidia.com>2024-06-26 13:26:40 +0300
committerMichael S. Tsirkin <mst@redhat.com>2024-07-09 08:42:43 -0400
commitad80739262b5aed3621accbd6015d55a6e662294 (patch)
tree290649d39a563a98d8d0d8a9fb9e61fce11560bd /drivers
parent4c90a60ac2e09bcf615f7276d2fd1b2ba96bdce0 (diff)
vdpa/mlx5: Drop redundant check in teardown_virtqueues()
The check is done inside teardown_vq(). Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Eugenio PĂ©rez <eperezma@redhat.com> Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com> Message-Id: <20240626-stage-vdpa-vq-precreate-v2-4-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/vdpa/mlx5/net/mlx5_vnet.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index b4d9ef4f66c8..96782b34e2b2 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -2559,16 +2559,10 @@ err_vq:
static void teardown_virtqueues(struct mlx5_vdpa_net *ndev)
{
- struct mlx5_vdpa_virtqueue *mvq;
int i;
- for (i = ndev->mvdev.max_vqs - 1; i >= 0; i--) {
- mvq = &ndev->vqs[i];
- if (!mvq->initialized)
- continue;
-
- teardown_vq(ndev, mvq);
- }
+ for (i = ndev->mvdev.max_vqs - 1; i >= 0; i--)
+ teardown_vq(ndev, &ndev->vqs[i]);
}
static void update_cvq_info(struct mlx5_vdpa_dev *mvdev)