diff mbox series

drm/vmwgfx: Remove useless variable

Message ID 1617869482-49962-1-git-send-email-jiapeng.chong@linux.alibaba.com (mailing list archive)
State New, archived
Headers show
Series drm/vmwgfx: Remove useless variable | expand

Commit Message

Jiapeng Chong April 8, 2021, 8:11 a.m. UTC
Fix the following gcc warning:

drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c:163:6: warning: variable
‘ret’ set but not used [-Wunused-but-set-variable].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c
index 44d858c..0d210f8 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c
@@ -160,7 +160,6 @@  void vmw_cmdbuf_res_commit(struct list_head *list)
 void vmw_cmdbuf_res_revert(struct list_head *list)
 {
 	struct vmw_cmdbuf_res *entry, *next;
-	int ret;
 
 	list_for_each_entry_safe(entry, next, list, head) {
 		switch (entry->state) {
@@ -168,7 +167,7 @@  void vmw_cmdbuf_res_revert(struct list_head *list)
 			vmw_cmdbuf_res_free(entry->man, entry);
 			break;
 		case VMW_CMDBUF_RES_DEL:
-			ret = drm_ht_insert_item(&entry->man->resources,
+			drm_ht_insert_item(&entry->man->resources,
 						 &entry->hash);
 			list_del(&entry->head);
 			list_add_tail(&entry->head, &entry->man->list);