Skip to content

Commit

Permalink
drm/mgag200: remove unneeded variable
Browse files Browse the repository at this point in the history
ttm_bo_validate() returns 0 or error. So we can return the value
directly and remove the variable 'ret'.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Sudip Mukherjee authored and Daniel Vetter committed Jul 17, 2015
1 parent 546aee5 commit f9fe4b9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/gpu/drm/mgag200/mgag200_ttm.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ int mgag200_bo_pin(struct mgag200_bo *bo, u32 pl_flag, u64 *gpu_addr)

int mgag200_bo_unpin(struct mgag200_bo *bo)
{
int i, ret;
int i;
if (!bo->pin_count) {
DRM_ERROR("unpin bad %p\n", bo);
return 0;
Expand All @@ -389,11 +389,7 @@ int mgag200_bo_unpin(struct mgag200_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 mgag200_bo_push_sysram(struct mgag200_bo *bo)
Expand Down

0 comments on commit f9fe4b9

Please sign in to comment.