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: Veera Sundaram Sankaran <veeras@codeaurora.org>
This commit is contained in:
parent
e07af1b53a
commit
3fdd8450ea
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue