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 /drivers/iommu/amd_iommu.c | |
parent | 82fcfc674ebe2a0d83a6dd1b6ffa5589a94e4d4c (diff) | |
download | op-kernel-dev-e644a013fe67f2bccd54378b88556d07fa2714d6.zip op-kernel-dev-e644a013fe67f2bccd54378b88556d07fa2714d6.tar.gz |
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 6dc6594..72531f0 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; |