diff options
author | Radmila Kompová <xkompo00@stud.fit.vutbr.cz> | 2013-05-02 11:24:25 -0400 |
---|---|---|
committer | Joerg Roedel <joro@8bytes.org> | 2013-08-14 16:15:46 -0400 |
commit | e644a013fe67f2bccd54378b88556d07fa2714d6 (patch) | |
tree | ffb0f31cee8b136e15a5f282bdeccc10d0981dd5 /drivers/iommu/amd_iommu.c | |
parent | 82fcfc674ebe2a0d83a6dd1b6ffa5589a94e4d4c (diff) |
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>
Diffstat (limited to 'drivers/iommu/amd_iommu.c')
-rw-r--r-- | drivers/iommu/amd_iommu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 6dc659426a51..72531f008a5e 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c | |||
@@ -456,8 +456,10 @@ static int iommu_init_device(struct device *dev) | |||
456 | } | 456 | } |
457 | 457 | ||
458 | ret = init_iommu_group(dev); | 458 | ret = init_iommu_group(dev); |
459 | if (ret) | 459 | if (ret) { |
460 | free_dev_data(dev_data); | ||
460 | return ret; | 461 | return ret; |
462 | } | ||
461 | 463 | ||
462 | if (pci_iommuv2_capable(pdev)) { | 464 | if (pci_iommuv2_capable(pdev)) { |
463 | struct amd_iommu *iommu; | 465 | struct amd_iommu *iommu; |