mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
msm: kgsl: Properly handle attach error for secure pagetable
Properly handle error paths in _init_secure_pt. Change-Id: Ic0dedbadf297579a2cfbab6e40f2aac4752cca94 Signed-off-by: Deepak Kumar <[email protected]> Signed-off-by: Jordan Crouse <[email protected]>
This commit is contained in:
parent
0f9ebd5579
commit
5fc8a2d9f0
1 changed files with 7 additions and 5 deletions
|
|
@ -1249,12 +1249,17 @@ static int _init_secure_pt(struct kgsl_mmu *mmu, struct kgsl_pagetable *pt)
|
|||
if (ret) {
|
||||
dev_err(device->dev, "set DOMAIN_ATTR_SECURE_VMID failed: %d\n",
|
||||
ret);
|
||||
goto done;
|
||||
_free_pt(ctx, pt);
|
||||
return ret;
|
||||
}
|
||||
|
||||
_enable_gpuhtw_llc(mmu, iommu_pt->domain);
|
||||
|
||||
ret = _attach_pt(iommu_pt, ctx);
|
||||
if (ret) {
|
||||
_free_pt(ctx, pt);
|
||||
return ret;
|
||||
}
|
||||
|
||||
iommu_set_fault_handler(iommu_pt->domain,
|
||||
kgsl_iommu_fault_handler, pt);
|
||||
|
|
@ -1265,10 +1270,7 @@ static int _init_secure_pt(struct kgsl_mmu *mmu, struct kgsl_pagetable *pt)
|
|||
kgsl_iommu_map_secure_global(mmu, &md->memdesc);
|
||||
}
|
||||
|
||||
done:
|
||||
if (ret)
|
||||
_free_pt(ctx, pt);
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
static int _init_secure_pt(struct kgsl_mmu *mmu, struct kgsl_pagetable *pt)
|
||||
|
|
|
|||
Loading…
Reference in a new issue