Skip to content

Commit

Permalink
iommu/amd: Fix resource leak in iommu_init_device()
Browse files Browse the repository at this point in the history
Detected by cppcheck.

Signed-off-by: Kamil Dudka <kdudka@redhat.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
  • Loading branch information
Radmila Kompová authored and Joerg Roedel committed Aug 14, 2013
1 parent 82fcfc6 commit e644a01
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/iommu/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e644a01

Please sign in to comment.