summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/mgag200
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-07-01 17:12:46 +0530
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-07-17 08:50:45 +0200
commitf9fe4b9b2ad4f2b801fdff3d634b07c9f9fc4327 (patch)
tree5dc6250593471bc6c3b68ff2c7e94412900680b1 /drivers/gpu/drm/mgag200
parent546aee51ecacf6605b15f6a2580926f956dc5a3e (diff)
downloadblackbird-obmc-linux-f9fe4b9b2ad4f2b801fdff3d634b07c9f9fc4327.tar.gz
blackbird-obmc-linux-f9fe4b9b2ad4f2b801fdff3d634b07c9f9fc4327.zip
drm/mgag200: remove unneeded variable
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>
Diffstat (limited to 'drivers/gpu/drm/mgag200')
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_ttm.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_ttm.c b/drivers/gpu/drm/mgag200/mgag200_ttm.c
index d16964ea0ed4..05108b505fbf 100644
--- a/drivers/gpu/drm/mgag200/mgag200_ttm.c
+++ b/drivers/gpu/drm/mgag200/mgag200_ttm.c
@@ -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;
@@ -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)
OpenPOWER on IntegriCloud