diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/iommu/intel-iommu.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 40203ada635e..43b9bfea48fa 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
| @@ -3781,11 +3781,10 @@ static void iommu_detach_dependent_devices(struct intel_iommu *iommu, | |||
| 3781 | static void domain_remove_one_dev_info(struct dmar_domain *domain, | 3781 | static void domain_remove_one_dev_info(struct dmar_domain *domain, |
| 3782 | struct pci_dev *pdev) | 3782 | struct pci_dev *pdev) |
| 3783 | { | 3783 | { |
| 3784 | struct device_domain_info *info; | 3784 | struct device_domain_info *info, *tmp; |
| 3785 | struct intel_iommu *iommu; | 3785 | struct intel_iommu *iommu; |
| 3786 | unsigned long flags; | 3786 | unsigned long flags; |
| 3787 | int found = 0; | 3787 | int found = 0; |
| 3788 | struct list_head *entry, *tmp; | ||
| 3789 | 3788 | ||
| 3790 | iommu = device_to_iommu(pci_domain_nr(pdev->bus), pdev->bus->number, | 3789 | iommu = device_to_iommu(pci_domain_nr(pdev->bus), pdev->bus->number, |
| 3791 | pdev->devfn); | 3790 | pdev->devfn); |
| @@ -3793,8 +3792,7 @@ static void domain_remove_one_dev_info(struct dmar_domain *domain, | |||
| 3793 | return; | 3792 | return; |
| 3794 | 3793 | ||
| 3795 | spin_lock_irqsave(&device_domain_lock, flags); | 3794 | spin_lock_irqsave(&device_domain_lock, flags); |
| 3796 | list_for_each_safe(entry, tmp, &domain->devices) { | 3795 | list_for_each_entry_safe(info, tmp, &domain->devices, link) { |
| 3797 | info = list_entry(entry, struct device_domain_info, link); | ||
| 3798 | if (info->segment == pci_domain_nr(pdev->bus) && | 3796 | if (info->segment == pci_domain_nr(pdev->bus) && |
| 3799 | info->bus == pdev->bus->number && | 3797 | info->bus == pdev->bus->number && |
| 3800 | info->devfn == pdev->devfn) { | 3798 | info->devfn == pdev->devfn) { |
