summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2011-11-01 19:07:31 -0400
committerDave Airlie <airlied@redhat.com>2011-12-06 10:39:04 +0000
commitf9517e63ffae6a1062a0a2ac4eea60be49b9dfd4 (patch)
tree1b1504efaa7cc10bf04e51b51e6bf800c98ddb9f
parent5e2656804a34f58c2bf557465ab77f8a26a500eb (diff)
downloadlinux-stable-f9517e63ffae6a1062a0a2ac4eea60be49b9dfd4.tar.gz
linux-stable-f9517e63ffae6a1062a0a2ac4eea60be49b9dfd4.tar.bz2
linux-stable-f9517e63ffae6a1062a0a2ac4eea60be49b9dfd4.zip
drm/ttm: test for dma_address array allocation failure
Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
-rw-r--r--drivers/gpu/drm/ttm/ttm_tt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 90527a2ce04c..54bbbadba93c 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -320,7 +320,7 @@ struct ttm_tt *ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size,
ttm->dummy_read_page = dummy_read_page;
ttm_tt_alloc_page_directory(ttm);
- if (!ttm->pages) {
+ if (!ttm->pages || !ttm->dma_address) {
ttm_tt_destroy(ttm);
printk(KERN_ERR TTM_PFX "Failed allocating page table\n");
return NULL;