diff options
| -rw-r--r-- | drivers/iommu/intel-iommu.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 0f5e6c911e85..37ce54b188f3 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
| @@ -4147,13 +4147,12 @@ static int intel_iommu_attach_device(struct iommu_domain *domain, | |||
| 4147 | struct device *dev) | 4147 | struct device *dev) |
| 4148 | { | 4148 | { |
| 4149 | struct dmar_domain *dmar_domain = domain->priv; | 4149 | struct dmar_domain *dmar_domain = domain->priv; |
| 4150 | struct pci_dev *pdev = to_pci_dev(dev); | ||
| 4151 | struct intel_iommu *iommu; | 4150 | struct intel_iommu *iommu; |
| 4152 | int addr_width; | 4151 | int addr_width; |
| 4153 | u8 bus, devfn; | 4152 | u8 bus, devfn; |
| 4154 | 4153 | ||
| 4155 | /* normally pdev is not mapped */ | 4154 | /* normally dev is not mapped */ |
| 4156 | if (unlikely(domain_context_mapped(&pdev->dev))) { | 4155 | if (unlikely(domain_context_mapped(dev))) { |
| 4157 | struct dmar_domain *old_domain; | 4156 | struct dmar_domain *old_domain; |
| 4158 | 4157 | ||
| 4159 | old_domain = find_domain(dev); | 4158 | old_domain = find_domain(dev); |
