drm/vmwgfx: Remove the unneeded result variable
Subsystems (3)
PATCH 1/1 drm/vmwgfx: Remove the unneeded result variable
From: ye xingchen <[email protected]>
Return the value ttm_pool_alloc() directly instead of storing it in another redundant variable.
Reported-by Zeal Robot <[email protected]>
Signed-off-by ye xingchen <[email protected]>
--- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c +1 -5
@@ -470,15 +470,11 @@ static void vmw_ttm_destroy(struct ttm_device *bdev, struct ttm_tt *ttm)static int vmw_ttm_populate (struct ttm_device *bdev,struct ttm_tt *ttm,struct ttm_operation_ctx *ctx) { -int ret; -/* TODO: maybe completely drop this ? */ if (ttm_tt_is_populated (ttm))return 0 ; - ret =ttm_pool_alloc (&bdev->pool, ttm, ctx); - -return ret; +return ttm_pool_alloc (&bdev->pool, ttm, ctx); } static void vmw_ttm_unpopulate(struct ttm_device *bdev,
Signature · 1 line
2.25.1