Commit 927a5fdd authored by Matthew Rosato's avatar Matthew Rosato Committed by Joerg Roedel

iommu/s390: Fail probe for non-PCI devices

s390-iommu only supports pci_bus_type today.
Tested-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: default avatarMatthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/8cb71ea1b24bd2622c1937bd9cfffe73b126eb56.1660572783.git.robin.murphy@arm.comSigned-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent cbc04008
...@@ -185,7 +185,12 @@ static void s390_iommu_detach_device(struct iommu_domain *domain, ...@@ -185,7 +185,12 @@ static void s390_iommu_detach_device(struct iommu_domain *domain,
static struct iommu_device *s390_iommu_probe_device(struct device *dev) static struct iommu_device *s390_iommu_probe_device(struct device *dev)
{ {
struct zpci_dev *zdev = to_zpci_dev(dev); struct zpci_dev *zdev;
if (!dev_is_pci(dev))
return ERR_PTR(-ENODEV);
zdev = to_zpci_dev(dev);
return &zdev->iommu_dev; return &zdev->iommu_dev;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment