diff options
Diffstat (limited to 'drivers/iommu/iommu.c')
-rw-r--r-- | drivers/iommu/iommu.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 278055bd0715..74c371c53ee4 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c | |||
@@ -685,10 +685,14 @@ EXPORT_SYMBOL_GPL(iommu_domain_free); | |||
685 | 685 | ||
686 | int iommu_attach_device(struct iommu_domain *domain, struct device *dev) | 686 | int iommu_attach_device(struct iommu_domain *domain, struct device *dev) |
687 | { | 687 | { |
688 | int ret; | ||
688 | if (unlikely(domain->ops->attach_dev == NULL)) | 689 | if (unlikely(domain->ops->attach_dev == NULL)) |
689 | return -ENODEV; | 690 | return -ENODEV; |
690 | 691 | ||
691 | return domain->ops->attach_dev(domain, dev); | 692 | ret = domain->ops->attach_dev(domain, dev); |
693 | if (!ret) | ||
694 | trace_attach_device_to_domain(dev); | ||
695 | return ret; | ||
692 | } | 696 | } |
693 | EXPORT_SYMBOL_GPL(iommu_attach_device); | 697 | EXPORT_SYMBOL_GPL(iommu_attach_device); |
694 | 698 | ||