[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200917114246.93291-1-jingxiangfeng@huawei.com>
Date: Thu, 17 Sep 2020 19:42:46 +0800
From: Jing Xiangfeng <jingxiangfeng@...wei.com>
To: <christian.koenig@....com>, <ray.huang@....com>,
<airlied@...ux.ie>, <daniel@...ll.ch>
CC: <dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
<jingxiangfeng@...wei.com>
Subject: [PATCH] drm/ttm: remove redundant initialization of variable ret
The variable ret is being initialized with '-ENOMEM' that is
meaningless. So remove it.
Signed-off-by: Jing Xiangfeng <jingxiangfeng@...wei.com>
---
drivers/gpu/drm/ttm/ttm_tt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 3437711ddb43..4db87b9b57a8 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -388,7 +388,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage)
struct page *from_page;
struct page *to_page;
int i;
- int ret = -ENOMEM;
+ int ret;
BUG_ON(ttm->state != tt_unbound && ttm->state != tt_unpopulated);
BUG_ON(ttm->caching_state != tt_cached);
--
2.17.1
Powered by blists - more mailing lists