提交 e644a013 编写于 作者: R Radmila Kompová 提交者: Joerg Roedel

iommu/amd: Fix resource leak in iommu_init_device()

Detected by cppcheck.
Signed-off-by: NKamil Dudka <kdudka@redhat.com>
Signed-off-by: NJoerg Roedel <joro@8bytes.org>
上级 82fcfc67
...@@ -456,8 +456,10 @@ static int iommu_init_device(struct device *dev) ...@@ -456,8 +456,10 @@ static int iommu_init_device(struct device *dev)
} }
ret = init_iommu_group(dev); ret = init_iommu_group(dev);
if (ret) if (ret) {
free_dev_data(dev_data);
return ret; return ret;
}
if (pci_iommuv2_capable(pdev)) { if (pci_iommuv2_capable(pdev)) {
struct amd_iommu *iommu; struct amd_iommu *iommu;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册