diff options
author | Radmila Kompová <xkompo00@stud.fit.vutbr.cz> | 2013-05-02 17:24:25 +0200 |
---|---|---|
committer | Joerg Roedel <joro@8bytes.org> | 2013-08-14 22:15:46 +0200 |
commit | e644a013fe67f2bccd54378b88556d07fa2714d6 (patch) | |
tree | ffb0f31cee8b136e15a5f282bdeccc10d0981dd5 | |
parent | 82fcfc674ebe2a0d83a6dd1b6ffa5589a94e4d4c (diff) | |
download | linux-e644a013fe67f2bccd54378b88556d07fa2714d6.tar.bz2 |
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>
-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) } 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; |