diff options
author | 2014-02-10 02:11:02 +0000 | |
---|---|---|
committer | 2014-02-10 02:11:02 +0000 | |
commit | 7189d91108eba833ee3423529f31237da93d1423 (patch) | |
tree | 34070146510fbbf7bc673d8910b069ba65e92311 | |
parent | drm/radeon: expose render backend mask to the userspace (diff) | |
download | wireguard-openbsd-7189d91108eba833ee3423529f31237da93d1423.tar.xz wireguard-openbsd-7189d91108eba833ee3423529f31237da93d1423.zip |
drm/ttm: fix the tt_populated check in ttm_tt_destroy()
From Ben Skeggs
43a1ab9ba9d7c0d97e7079a09438fe1b4209e318 in ubuntu 3.8
182b17c8dc4e83aab000ce86587b6810e515da87 in mainline linux
-rw-r--r-- | sys/dev/pci/drm/ttm/ttm_tt.c | 4 |
1 files 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); } |