Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9fe4b9b authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Daniel Vetter
Browse files

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: default avatarSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 546aee51
Loading
Loading
Loading
Loading
+2 −6
Original line number Original line Diff line number Diff line
@@ -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 mgag200_bo_unpin(struct mgag200_bo *bo)
{
{
	int i, ret;
	int i;
	if (!bo->pin_count) {
	if (!bo->pin_count) {
		DRM_ERROR("unpin bad %p\n", bo);
		DRM_ERROR("unpin bad %p\n", bo);
		return 0;
		return 0;
@@ -389,11 +389,7 @@ int mgag200_bo_unpin(struct mgag200_bo *bo)


	for (i = 0; i < bo->placement.num_placement ; i++)
	for (i = 0; i < bo->placement.num_placement ; i++)
		bo->placements[i].flags &= ~TTM_PL_FLAG_NO_EVICT;
		bo->placements[i].flags &= ~TTM_PL_FLAG_NO_EVICT;
	ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
	return ttm_bo_validate(&bo->bo, &bo->placement, false, false);
	if (ret)
		return ret;

	return 0;
}
}


int mgag200_bo_push_sysram(struct mgag200_bo *bo)
int mgag200_bo_push_sysram(struct mgag200_bo *bo)