Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f3ca43c authored by Jing Zhou's avatar Jing Zhou Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarJing Zhou <jzhou70@codeaurora.org>
parent 5e66df5b
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -794,8 +794,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,
	rc = msm_dma_map_sg_lazy(iommu_cb_set.cb_info[idx].dev, table->sgl,
			table->nents, dma_dir, buf);
			table->nents, dma_dir, buf);
	if (!rc) {
	if (rc != table->nents) {
		pr_err("Error: msm_dma_map_sg_lazy failed\n");
		pr_err("Error: msm_dma_map_sg_lazy failed\n");
		rc = -ENOMEM;
		goto err_unmap_sg;
		goto err_unmap_sg;
	}
	}