aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/intel-iommu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index 3bd30557ce2e..bf8fd913d064 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -1874,14 +1874,15 @@ static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw)
1874 } 1874 }
1875 } 1875 }
1876 if (found) { 1876 if (found) {
1877 spin_unlock_irqrestore(&device_domain_lock, flags);
1877 free_devinfo_mem(info); 1878 free_devinfo_mem(info);
1878 domain_exit(domain); 1879 domain_exit(domain);
1879 domain = found; 1880 domain = found;
1880 } else { 1881 } else {
1881 list_add(&info->link, &domain->devices); 1882 list_add(&info->link, &domain->devices);
1882 list_add(&info->global, &device_domain_list); 1883 list_add(&info->global, &device_domain_list);
1884 spin_unlock_irqrestore(&device_domain_lock, flags);
1883 } 1885 }
1884 spin_unlock_irqrestore(&device_domain_lock, flags);
1885 } 1886 }
1886 1887
1887found_domain: 1888found_domain: