[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220112082422.667488-1-chi.minghao@zte.com.cn>
Date: Wed, 12 Jan 2022 08:24:22 +0000
From: cgel.zte@...il.com
To: linux-graphics-maintainer@...are.com
Cc: zackr@...are.com, airlied@...ux.ie, daniel@...ll.ch,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
Minghao Chi <chi.minghao@....com.cn>,
Zeal Robot <zealci@....com.cn>, CGEL ZTE <cgel.zte@...il.com>
Subject: [PATCH] drm/vmwgfx: remove redundant ret variable
From: Minghao Chi <chi.minghao@....com.cn>
Return value from vmw_gem_object_create_with_handle() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@...il.com>
---
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
index 31aecc46624b..91b03f1dbbf0 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
@@ -778,18 +778,14 @@ int vmw_dumb_create(struct drm_file *file_priv,
{
struct vmw_private *dev_priv = vmw_priv(dev);
struct vmw_buffer_object *vbo;
- int ret;
args->pitch = args->width * ((args->bpp + 7) / 8);
args->size = ALIGN(args->pitch * args->height, PAGE_SIZE);
- ret = vmw_gem_object_create_with_handle(dev_priv, file_priv,
+ return vmw_gem_object_create_with_handle(dev_priv, file_priv,
args->size, &args->handle,
&vbo);
- return ret;
-}
-
/**
* vmw_bo_swap_notify - swapout notify callback.
*
--
2.25.1
Powered by blists - more mailing lists