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

Commit dcccdc14 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Ben Skeggs
Browse files

drm/nouveau: fix missing return statement in nouveau_ttm_tt_unpopulate



nouveau_ttm_tt_unpopulate() is supposed to return right after calling
ttm_dma_unpopulate() in the case of a coherent buffer. The return
statement was omitted, leading to the pages being unmapped twice. Fix
this.

Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent c7e873f8
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1572,8 +1572,10 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
	 * so use the DMA API for them.
	 */
	if (!nv_device_is_cpu_coherent(device) &&
	    ttm->caching_state == tt_uncached)
	    ttm->caching_state == tt_uncached) {
		ttm_dma_unpopulate(ttm_dma, dev->dev);
		return;
	}

#if __OS_HAS_AGP
	if (drm->agp.stat == ENABLED) {