Commit e644a013 authored by Radmila Kompová's avatar Radmila Kompová Committed by Joerg Roedel

iommu/amd: Fix resource leak in iommu_init_device()

Detected by cppcheck.
Signed-off-by: default avatarKamil Dudka <kdudka@redhat.com>
Signed-off-by: default avatarJoerg Roedel <joro@8bytes.org>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment