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

iommu/s390: Fail probe for non-PCI devices

parent cbc04008
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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)
{
	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;
}