msm: camera_v2: Fix a return code issue in smmu mapping
This change fixed a return code bug in the cam smmu mapping code. Change-Id: Idff814e32fe3f5764f2ef678a68dad4eb0b8046d Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
This commit is contained in:
parent
9e4b3ba4af
commit
4f319d4ecd
1 changed files with 2 additions and 1 deletions
|
@ -788,8 +788,9 @@ static int cam_smmu_map_buffer_and_add_to_list(int idx, int ion_fd,
|
|||
|
||||
rc = msm_dma_map_sg_lazy(iommu_cb_set.cb_info[idx].dev, table->sgl,
|
||||
table->nents, dma_dir, buf);
|
||||
if (!rc) {
|
||||
if (rc != table->nents) {
|
||||
pr_err("Error: msm_dma_map_sg_lazy failed\n");
|
||||
rc = -ENOMEM;
|
||||
goto err_unmap_sg;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue