Commit 447aeb90 authored by Dave Airlie's avatar Dave Airlie

drm/ttm: fix unreachable code.

None of the in-tree drivers use user objects yet so this wasn't hitting
us.

Stanse found unreachable code in ttm_bo_add_ttm:
http://decibel.fi.muni.cz/~xslaby/stanse/error.cgi?db=32&id=714#l238Reported-by: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent ab2c0672
...@@ -275,9 +275,10 @@ static int ttm_bo_add_ttm(struct ttm_buffer_object *bo, bool zero_alloc) ...@@ -275,9 +275,10 @@ static int ttm_bo_add_ttm(struct ttm_buffer_object *bo, bool zero_alloc)
bo->ttm = ttm_tt_create(bdev, bo->num_pages << PAGE_SHIFT, bo->ttm = ttm_tt_create(bdev, bo->num_pages << PAGE_SHIFT,
page_flags | TTM_PAGE_FLAG_USER, page_flags | TTM_PAGE_FLAG_USER,
glob->dummy_read_page); glob->dummy_read_page);
if (unlikely(bo->ttm == NULL)) if (unlikely(bo->ttm == NULL)) {
ret = -ENOMEM; ret = -ENOMEM;
break; break;
}
ret = ttm_tt_set_user(bo->ttm, current, ret = ttm_tt_set_user(bo->ttm, current,
bo->buffer_start, bo->num_pages); bo->buffer_start, bo->num_pages);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment