diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-02-10 02:11:03 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-02-10 02:11:03 +0000 |
commit | 54f266af498c7927a80270ee69922c788f150471 (patch) | |
tree | 1c9e24682d181144e929af2dd077d09706dc5a37 | |
parent | f7542477870994263cf0ae3a280fb65447d08c4a (diff) |
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); } |