[PATCH v2 5/7] drm: msm: a6xx: Properly free up the iommu objects
From: Sharat Masetty
Date: Thu Jan 02 2020 - 06:03:03 EST
This patch calls the right function to destroy the iommu domain as well
as free the associated iommu structure there by facilitating proper
clean up of resources upon failure of creating an address space.
Signed-off-by: Sharat Masetty <smasetty@xxxxxxxxxxxxxx>
---
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index 0d72e6c..ab562f6 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -896,7 +896,7 @@ static unsigned long a6xx_gpu_busy(struct msm_gpu *gpu)
aspace = msm_gem_address_space_create(mmu, "gpu", SZ_16M, 0xffffffff);
if (IS_ERR(aspace))
- iommu_domain_free(iommu);
+ mmu->funcs->destroy(mmu);
return aspace;
}
--
1.9.1