drivers/iommu/amd_iommu.c: fix resource leak in iommu_init_device()
PATCH 1/2 drivers/iommu/amd_iommu.c: fix resource leak in iommu_init_device()
Detected by cppcheck.
Signed-off-by Kamil Dudka <[email protected]>
--- drivers/iommu/amd_iommu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/iommu/amd_iommu.c +3 -1
@@ -448,8 +448,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;
Signature · 1 line
1.8.1.5
Quoted 3 lines · Radmila Kompová
Detected by cppcheck.
Signed-off-by Kamil Dudka <[email protected]>
Applied to x86/amd, thanks.