All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/vmwgfx: remove redundant ret variable
@ 2022-01-12  8:24 ` cgel.zte
  0 siblings, 0 replies; 5+ messages in thread
From: cgel.zte @ 2022-01-12  8:24 UTC (permalink / raw)
  To: linux-graphics-maintainer
  Cc: airlied, CGEL ZTE, Zeal Robot, linux-kernel, Minghao Chi,
	dri-devel

From: Minghao Chi <chi.minghao@zte.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@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-19  5:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-12  8:24 [PATCH] drm/vmwgfx: remove redundant ret variable cgel.zte
2022-01-12  8:24 ` cgel.zte
2022-01-12 18:01 ` kernel test robot
2022-01-12 18:01   ` kernel test robot
2022-07-19  5:43   ` flora davis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.