From 54f266af498c7927a80270ee69922c788f150471 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Mon, 10 Feb 2014 02:11:03 +0000 Subject: drm/ttm: fix the tt_populated check in ttm_tt_destroy() From Ben Skeggs 43a1ab9ba9d7c0d97e7079a09438fe1b4209e318 in ubuntu 3.8 182b17c8dc4e83aab000ce86587b6810e515da87 in mainline linux --- sys/dev/pci/drm/ttm/ttm_tt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/drm/ttm/ttm_tt.c b/sys/dev/pci/drm/ttm/ttm_tt.c index 88f99c213f3..4bee3414812 100644 --- a/sys/dev/pci/drm/ttm/ttm_tt.c +++ b/sys/dev/pci/drm/ttm/ttm_tt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ttm_tt.c,v 1.2 2013/12/08 07:54:06 jsg Exp $ */ +/* $OpenBSD: ttm_tt.c,v 1.3 2014/02/10 02:11:02 jsg Exp $ */ /************************************************************************** * * Copyright (c) 2006-2009 VMware, Inc., Palo Alto, CA., USA @@ -168,7 +168,7 @@ void ttm_tt_destroy(struct ttm_tt *ttm) ttm_tt_unbind(ttm); } - if (likely(ttm->pages != NULL)) { + if (ttm->state == tt_unbound) { ttm->bdev->driver->ttm_tt_unpopulate(ttm); } -- cgit v1.2.3