Skip to content

Commit

Permalink
iommu/vt-d: Use domain_remove_one_dev_info() in domain_add_dev_info()…
Browse files Browse the repository at this point in the history
… error path

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Mar 24, 2014
1 parent 0ac7266 commit e2f8c5f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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;
}

Expand Down

0 comments on commit e2f8c5f

Please sign in to comment.