vmwgfx: remove redundant ret variable
Subsystems (3)
PATCH 1/1 vmwgfx: remove redundant ret variable
From: Minghao Chi <[email protected]>
Return value directly instead of taking this in another redundant variable.
Reported-by Zeal Robot <[email protected]>
Signed-off-by Minghao Chi <[email protected]>
Signed-off-by CGEL ZTE <[email protected]>
--- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +3 -10
@@ -1263,7 +1263,6 @@ static int vmw_cmd_dx_define_query(struct vmw_private *dev_priv,VMW_DECLARE_CMD_VAR (*cmd, SVGA3dCmdDXDefineQuery);struct vmw_ctx_validation_info *ctx_node =VMW_GET_CTX_NODE (sw_context);struct vmw_resource *cotable_res; -int ret;if (!ctx_node)return -EINVAL ;
@@ -1275,9 +1274,8 @@ static int vmw_cmd_dx_define_query(struct vmw_private *dev_priv,return -EINVAL ; cotable_res =vmw_context_cotable (ctx_node->ctx,SVGA_COTABLE_DXQUERY ); - ret =vmw_cotable_notify (cotable_res, cmd->body.queryId); -return ret; +return vmw_cotable_notify (cotable_res, cmd->body.queryId); }/**
@@ -2576,7 +2574,6 @@ static int vmw_cmd_dx_so_define(struct vmw_private *dev_priv,uint32 defined_id; } *cmd;enum vmw_so_type so_type; -int ret;if (!ctx_node)return -EINVAL ;
@@ -2586,9 +2583,8 @@ static int vmw_cmd_dx_so_define(struct vmw_private *dev_priv,if (IS_ERR (res))return PTR_ERR (res); cmd =container_of (header,typeof (*cmd), header); - ret =vmw_cotable_notify (res, cmd->defined_id); -return ret; +return vmw_cotable_notify (res, cmd->defined_id); }/**
@@ -2726,15 +2722,12 @@ static int vmw_cmd_dx_destroy_shader(struct vmw_private *dev_priv,struct vmw_ctx_validation_info *ctx_node =VMW_GET_CTX_NODE (sw_context);VMW_DECLARE_CMD_VAR (*cmd, SVGA3dCmdDXDestroyShader) =container_of (header,typeof (*cmd), header); -int ret;if (!ctx_node)return -EINVAL ; - ret =vmw_shader_remove (sw_context->man, cmd->body.shaderId,0 , +return vmw_shader_remove (sw_context->man, cmd->body.shaderId,0 , &sw_context->staged_cmd_res); - -return ret; }/**
Signature · 1 line
2.25.1