Skip to contentSkip to conversation

drm/vmwgfx: Remove the unneeded result variable

PATCH New [email protected] 1 participant 1 message Sep 20, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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.

---
 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
index 4e3938e62c08..f17e0da7475d 100644
@@ -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