mirror of
https://github.com/torvalds/linux.git
synced 2024-12-01 00:21:32 +00:00
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>
This commit is contained in:
parent
5e2656804a
commit
f9517e63ff
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user