提交 e2f8c5f6 编写于 作者: D David Woodhouse

iommu/vt-d: Use domain_remove_one_dev_info() in domain_add_dev_info() error path

Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 0ac72664
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册