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>
This commit is contained in:
parent
82fcfc674e
commit
e644a013fe
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user