mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
msm: camera: memmgr: fix lack of condition lead to memory leak
When multi map fails, the first mapping does not unmap due to lack of condition. CRs-Fixed: 2768768 Change-Id: Ib61ce8f5a73e5c27b1b19bbd23d6649c62feb0da Signed-off-by: zhuo <zhuo@codeaurora.org>
This commit is contained in:
parent
2712471048
commit
334028442c
1 changed files with 2 additions and 2 deletions
|
|
@ -626,10 +626,10 @@ static int cam_mem_util_map_hw_va(uint32_t flags,
|
|||
return rc;
|
||||
multi_map_fail:
|
||||
if (flags & CAM_MEM_FLAG_PROTECTED_MODE)
|
||||
for (--i; i > 0; i--)
|
||||
for (--i; i >= 0; i--)
|
||||
cam_smmu_unmap_stage2_iova(mmu_hdls[i], fd);
|
||||
else
|
||||
for (--i; i > 0; i--)
|
||||
for (--i; i >= 0; i--)
|
||||
cam_smmu_unmap_user_iova(mmu_hdls[i],
|
||||
fd,
|
||||
CAM_SMMU_REGION_IO);
|
||||
|
|
|
|||
Loading…
Reference in a new issue