Commit 63ca94ad authored by Akhil P Oommen's avatar Akhil P Oommen Committed by Rob Clark
Browse files

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: default avatarAkhil P Oommen <akhilpo@codeaurora.org>
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent 9d8baa2b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;
}