summaryrefslogtreecommitdiff
path: root/drivers/vfio/fsl-mc
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2021-09-30 21:55:35 +0300
committerAlex Williamson <alex.williamson@redhat.com>2021-09-30 21:55:35 +0300
commitd9a0cd510c3383b61db6f70a84e0c3487f836a63 (patch)
tree384270fd284d62726c9e1fbba8216cb5933e7898 /drivers/vfio/fsl-mc
parent02d5e016800d082058b3d3b7c3ede136cdc6ddcb (diff)
parent3f901389fa88d32d660cf2209aac6e395902d017 (diff)
downloadlinux-d9a0cd510c3383b61db6f70a84e0c3487f836a63.tar.xz
Merge branch 'v5.16/vfio/hch-cleanup-vfio-iommu_group-creation-v6' into v5.16/vfio/next
Diffstat (limited to 'drivers/vfio/fsl-mc')
-rw-r--r--drivers/vfio/fsl-mc/vfio_fsl_mc.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
index 0ead91bfa838..9e838fed5603 100644
--- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
+++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
@@ -505,22 +505,13 @@ static void vfio_fsl_uninit_device(struct vfio_fsl_mc_device *vdev)
static int vfio_fsl_mc_probe(struct fsl_mc_device *mc_dev)
{
- struct iommu_group *group;
struct vfio_fsl_mc_device *vdev;
struct device *dev = &mc_dev->dev;
int ret;
- group = vfio_iommu_group_get(dev);
- if (!group) {
- dev_err(dev, "VFIO_FSL_MC: No IOMMU group\n");
- return -EINVAL;
- }
-
vdev = kzalloc(sizeof(*vdev), GFP_KERNEL);
- if (!vdev) {
- ret = -ENOMEM;
- goto out_group_put;
- }
+ if (!vdev)
+ return -ENOMEM;
vfio_init_group_dev(&vdev->vdev, dev, &vfio_fsl_mc_ops);
vdev->mc_dev = mc_dev;
@@ -556,8 +547,6 @@ out_device:
out_uninit:
vfio_uninit_group_dev(&vdev->vdev);
kfree(vdev);
-out_group_put:
- vfio_iommu_group_put(group, dev);
return ret;
}
@@ -574,8 +563,6 @@ static int vfio_fsl_mc_remove(struct fsl_mc_device *mc_dev)
vfio_uninit_group_dev(&vdev->vdev);
kfree(vdev);
- vfio_iommu_group_put(mc_dev->dev.iommu_group, dev);
-
return 0;
}