summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ast
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2017-07-18 16:47:36 +0200
committerDave Airlie <airlied@redhat.com>2017-08-02 04:12:24 +0200
commit587b9b1a2a068c01fdf51003a7b6951761041d01 (patch)
treefc3ce50212dc63e427bb459dfe29b7e1b093dc87 /drivers/gpu/drm/ast
parentdrm: linux-next: build failure after merge of the drm-misc tree (diff)
downloadlinux-587b9b1a2a068c01fdf51003a7b6951761041d01.tar.xz
linux-587b9b1a2a068c01fdf51003a7b6951761041d01.zip
drm/ast: Simplify function ast_bo_unpin()
Just a code refactoring, no functional change. Signed-off-by: Egbert Eich <eich@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/ast')
-rw-r--r--drivers/gpu/drm/ast/ast_ttm.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/ast/ast_ttm.c b/drivers/gpu/drm/ast/ast_ttm.c
index 58084985e6cf..0b4c574defe7 100644
--- a/drivers/gpu/drm/ast/ast_ttm.c
+++ b/drivers/gpu/drm/ast/ast_ttm.c
@@ -376,7 +376,7 @@ int ast_bo_pin(struct ast_bo *bo, u32 pl_flag, u64 *gpu_addr)
int ast_bo_unpin(struct ast_bo *bo)
{
- int i, ret;
+ int i;
if (!bo->pin_count) {
DRM_ERROR("unpin bad %p\n", bo);
return 0;
@@ -387,11 +387,7 @@ int ast_bo_unpin(struct ast_bo *bo)
for (i = 0; i < bo->placement.num_placement ; i++)
bo->placements[i].flags &= ~TTM_PL_FLAG_NO_EVICT;
- ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
- if (ret)
- return ret;
-
- return 0;
+ return ttm_bo_validate(&bo->bo, &bo->placement, false, false);
}
int ast_bo_push_sysram(struct ast_bo *bo)