[PATCH 06/12] drm/ttm: test for dma_address array allocation failure
Thomas Hellstrom
thellstrom at vmware.com
Tue Nov 8 00:12:06 PST 2011
Reviewed-by: Thomas Hellstrom <thellstrom at vmware.com>
On 11/08/2011 12:40 AM, j.glisse at gmail.com wrote:
> From: Jerome Glisse<jglisse at redhat.com>
>
> Signed-off-by: Jerome Glisse<jglisse at redhat.com>
> Reviewed-by: Konrad Rzeszutek Wilk<konrad.wilk at oracle.com>
> ---
> drivers/gpu/drm/ttm/ttm_tt.c | 2 +-
> 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 2dd45ca..58ea7dc 100644
> --- a/drivers/gpu/drm/ttm/ttm_tt.c
> +++ b/drivers/gpu/drm/ttm/ttm_tt.c
> @@ -298,7 +298,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;
>
More information about the dri-devel
mailing list