summaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2014-03-09 13:25:07 -0700
committerDavid Woodhouse <David.Woodhouse@intel.com>2014-03-24 14:06:42 +0000
commite2f8c5f6d45b092b52adea9d71018ef11250b924 (patch)
tree3744253081cecc48a110f7199b0cfa90822c439f /drivers/iommu
parent0ac72664853b3181a437afb02a86d7c6f792e031 (diff)
downloadop-kernel-dev-e2f8c5f6d45b092b52adea9d71018ef11250b924.zip
op-kernel-dev-e2f8c5f6d45b092b52adea9d71018ef11250b924.tar.gz
iommu/vt-d: Use domain_remove_one_dev_info() in domain_add_dev_info() error path
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/intel-iommu.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 7d3d33f..84f0d42 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -2453,8 +2453,6 @@ static int domain_add_dev_info(struct dmar_domain *domain,
int translation)
{
struct dmar_domain *ndomain;
- struct device_domain_info *info;
- unsigned long flags;
int ret;
ndomain = dmar_insert_dev_info(pci_domain_nr(pdev->bus),
@@ -2465,11 +2463,7 @@ static int domain_add_dev_info(struct dmar_domain *domain,
ret = domain_context_mapping(domain, pdev, translation);
if (ret) {
- spin_lock_irqsave(&device_domain_lock, flags);
- info = pdev->dev.archdata.iommu;
- unlink_domain_info(info);
- spin_unlock_irqrestore(&device_domain_lock, flags);
- free_devinfo_mem(info);
+ domain_remove_one_dev_info(domain, pdev);
return ret;
}
OpenPOWER on IntegriCloud