From: Jerome Glisse Date: Tue, 1 Nov 2011 23:07:31 +0000 (-0400) Subject: drm/ttm: test for dma_address array allocation failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f9517e63ffae6a1062a0a2ac4eea60be49b9dfd4;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drm/ttm: test for dma_address array allocation failure Signed-off-by: Jerome Glisse Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Thomas Hellstrom --- 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;