drm/msm: Leave inuse count intact on map failure

Leave the inuse count intact on map failure to keep the accounting
accurate.

Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
This commit is contained in:
Akhil P Oommen 2020-09-22 20:25:27 +05:30 committed by Rob Clark
parent 9d8baa2bf2
commit 63ca94adc0

View file

@ -88,8 +88,10 @@ msm_gem_map_vma(struct msm_gem_address_space *aspace,
ret = aspace->mmu->funcs->map(aspace->mmu, vma->iova, sgt,
size, prot);
if (ret)
if (ret) {
vma->mapped = false;
vma->inuse--;
}
return ret;
}