Subject: [PATCH] vdpa/mlx5: Extract correct pointer from driver data

From: Eli Cohen <[email-masked]>
Date: Tue, 16 Feb 2021 07:50:22 +0200

struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
in mlx5v_remove().

Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
Signed-off-by: Eli Cohen <[email-masked]>
---
 drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index 6b0a42183622..4103d3b64a2a 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -2036,9 +2036,9 @@ static int mlx5v_probe(struct auxiliary_device *adev,
 
 static void mlx5v_remove(struct auxiliary_device *adev)
 {
-	struct mlx5_vdpa_dev *mvdev = dev_get_drvdata(&adev->dev);
+	struct mlx5_vdpa_net *ndev = dev_get_drvdata(&adev->dev);
 
-	vdpa_unregister_device(&mvdev->vdev);
+	vdpa_unregister_device(&ndev->mvdev.vdev);
 }
 
 static const struct auxiliary_device_id mlx5v_id_table[] = {
-- 
2.29.2