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

Commit adef0240 authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: fix error checking for dma_map_sg_lazy



dma_map_sg_lazy returns the nents value, ie the number of entries in
sglist which is passed on success. Error checking should be done based
on nents value and not on non-zero return value.

Change-Id: I341990fcd4eb123306fb8d1c3b08be85f0b7764b
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent ef0d0e07
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -265,7 +265,7 @@ static int mdss_smmu_map_dma_buf_v2(struct dma_buf *dma_buf,
	ATRACE_BEGIN("map_buffer");
	rc = msm_dma_map_sg_lazy(mdss_smmu->dev, table->sgl, table->nents, dir,
		dma_buf);
	if (!rc) {
	if (rc != table->nents) {
		pr_err("dma map sg failed\n");
		return -ENOMEM;
	}