diff options
author | Robin Murphy <robin.murphy@arm.com> | 2023-11-21 18:04:03 +0000 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2023-11-27 11:03:16 +0100 |
commit | e7080665c977ea1aafb8547a9c7bd08b199311d6 (patch) | |
tree | b50a0af095751dbc9e46f1e7c240cac8c9d94e91 /drivers/iommu/virtio-iommu.c | |
parent | 17de3f5fdd35676b0e3d41c7c9bf4e3032eb3673 (diff) |
iommu: Clean up open-coded ownership checks
Some drivers already implement their own defence against the possibility
of being given someone else's device. Since this is now taken care of by
the core code (and via a slightly different path from the original
fwspec-based idea), let's clean them up.
Acked-by: Will Deacon <will@kernel.org>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/58a9879ce3f03562bb061e6714fe6efb554c3907.1700589539.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/virtio-iommu.c')
-rw-r--r-- | drivers/iommu/virtio-iommu.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c index 379ebe03efb6..9bcffdde6175 100644 --- a/drivers/iommu/virtio-iommu.c +++ b/drivers/iommu/virtio-iommu.c @@ -969,9 +969,6 @@ static struct iommu_device *viommu_probe_device(struct device *dev) struct viommu_dev *viommu = NULL; struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); - if (!fwspec || fwspec->ops != &viommu_ops) - return ERR_PTR(-ENODEV); - viommu = viommu_get_by_fwnode(fwspec->iommu_fwnode); if (!viommu) return ERR_PTR(-ENODEV); |