drm/vmwgfx: remove redundant return ret statement
Subsystems (4)
PATCH 1/1 drm/vmwgfx: remove redundant return ret statement
From: Colin Ian King <[email protected]>
The return statement is redundant as there is a return statement immediately before it so we have dead code that can be removed. Also remove the unused declaration of ret.
Detected by CoverityScan, CID#1473793 ("Structurally dead code")
--- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +0 -2
@@ -1738,7 +1738,6 @@ static int vmw_cmd_check_define_gmrfb(struct vmw_private *dev_priv, void *buf) {struct vmw_buffer_object *vmw_bo; -int ret;struct {uint32_t header;
@@ -1748,7 +1747,6 @@ static int vmw_cmd_check_define_gmrfb(struct vmw_private *dev_priv,return vmw_translate_guest_ptr (dev_priv, sw_context, &cmd->body.ptr, &vmw_bo); -return ret; }
Signature · 1 line
2.17.1
Good catch.
Quoted 36 lines · Colin King
From: Colin Ian King <[email protected]>
The return statement is redundant as there is a return statement immediately before it so we have dead code that can be removed. Also remove the unused declaration of ret.
Detected by CoverityScan, CID#1473793 ("Structurally dead code")
Signed-off-by Colin Ian King <[email protected]>--- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +0
-2@@ -1738,7 +1738,6 @@ static int vmw_cmd_check_define_gmrfb(struct vmw_private *dev_priv, void *buf) {struct vmw_buffer_object *vmw_bo; -int ret;struct {uint32_t header;@@ -1748,7 +1747,6 @@ static int vmw_cmd_check_define_gmrfb(struct vmw_private *dev_priv,return vmw_translate_guest_ptr (dev_priv, sw_context, &cmd->body.ptr, &vmw_bo); -return ret; }Signature · 1 line
2.17.1
Quoted 8 lines · Colin King
From: Colin Ian King <[email protected]>
The return statement is redundant as there is a return statement immediately before it so we have dead code that can be removed. Also remove the unused declaration of ret.
Detected by CoverityScan, CID#1473793 ("Structurally dead code")
Introduced by commit b139d43dacef ("drm/vmwgfx: Make buffer object lookups reference-free during validation"). The fix looks good.
regards,
dan carpenter