drm/vmwgfx: remove redundant return ret statement
authorColin Ian King <colin.king@canonical.com>
Thu, 4 Oct 2018 17:49:53 +0000 (18:49 +0100)
committerThomas Hellstrom <thellstrom@vmware.com>
Wed, 12 Dec 2018 11:01:05 +0000 (12:01 +0100)
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 <colin.king@canonical.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c

index 5a6b70ba137aa321fe606946640464d861338087..260650bb5560aab65c2b4e149e0a1a26a2e62b19 100644 (file)
@@ -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;
 }