summaryrefslogtreecommitdiff
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorJing Zhou <jzhou70@codeaurora.org>2016-07-05 15:42:23 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-07-20 16:22:52 -0700
commit4f319d4ecdaa5ec6c5344146267239790ae8038c (patch)
treee462a7053423af90feca1e7d5d5323498cfb7c6d /drivers/media/platform
parent9e4b3ba4afcff08bce320513610955391ab95806 (diff)
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>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c b/drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c
index 6b43efce453f..03a61407aef8 100644
--- a/drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c
+++ b/drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c
@@ -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;
}