1
0
Fork 0

iommu/amd: Fix resource leak in iommu_init_device()

Detected by cppcheck.

Signed-off-by: Kamil Dudka <kdudka@redhat.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
hifive-unleashed-5.1
Radmila Kompová 2013-05-02 17:24:25 +02:00 committed by Joerg Roedel
parent 82fcfc674e
commit e644a013fe
1 changed files with 3 additions and 1 deletions

View File

@ -456,8 +456,10 @@ static int iommu_init_device(struct device *dev)
}
ret = init_iommu_group(dev);
if (ret)
if (ret) {
free_dev_data(dev_data);
return ret;
}
if (pci_iommuv2_capable(pdev)) {
struct amd_iommu *iommu;