drm/vmwgfx/vmwgfx_cmdbuf_res: Remove unused variable 'ret'
[ Upstream commit 43ebfe61c3928573a5ef8d80c2f5300aa5c904c0 ] Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c: In function ‘vmw_cmdbuf_res_revert’: drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c:162:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: VMware Graphics <linux-graphics-maintainer@vmware.com> Cc: Roland Scheidegger <sroland@vmware.com> Cc: Zack Rusin <zackr@vmware.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Zack Rusin <zackr@vmware.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-40-lee.jones@linaro.org Stable-dep-of: 517621b70600 ("drm/vmwgfx: Fix possible null pointer derefence with invalid contexts") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
b6fc792bf8
commit
dc7cd107ce
@@ -160,7 +160,6 @@ void vmw_cmdbuf_res_commit(struct list_head *list)
|
|||||||
void vmw_cmdbuf_res_revert(struct list_head *list)
|
void vmw_cmdbuf_res_revert(struct list_head *list)
|
||||||
{
|
{
|
||||||
struct vmw_cmdbuf_res *entry, *next;
|
struct vmw_cmdbuf_res *entry, *next;
|
||||||
int ret;
|
|
||||||
|
|
||||||
list_for_each_entry_safe(entry, next, list, head) {
|
list_for_each_entry_safe(entry, next, list, head) {
|
||||||
switch (entry->state) {
|
switch (entry->state) {
|
||||||
@@ -168,8 +167,7 @@ void vmw_cmdbuf_res_revert(struct list_head *list)
|
|||||||
vmw_cmdbuf_res_free(entry->man, entry);
|
vmw_cmdbuf_res_free(entry->man, entry);
|
||||||
break;
|
break;
|
||||||
case VMW_CMDBUF_RES_DEL:
|
case VMW_CMDBUF_RES_DEL:
|
||||||
ret = drm_ht_insert_item(&entry->man->resources,
|
drm_ht_insert_item(&entry->man->resources, &entry->hash);
|
||||||
&entry->hash);
|
|
||||||
list_del(&entry->head);
|
list_del(&entry->head);
|
||||||
list_add_tail(&entry->head, &entry->man->list);
|
list_add_tail(&entry->head, &entry->man->list);
|
||||||
entry->state = VMW_CMDBUF_RES_COMMITTED;
|
entry->state = VMW_CMDBUF_RES_COMMITTED;
|
||||||
|
Reference in New Issue
Block a user