Commit 49558b47 authored by Christian Engelmayer's avatar Christian Engelmayer Committed by Thomas Hellstrom

drm/vmwgfx: Fix uninitialized return in vmw_cotable_unbind()

Function vmw_cotable_unbind() uses the uninitialized variable ret as
return value. Make the result deterministic and directly return as
the variable is unused anyway. Detected by Coverity CID 1324256.
Signed-off-by: default avatarChristian Engelmayer <cengelma@gmx.at>
Reviewed-by: default avatarSinclair Yeh <syeh@vmware.com>
Reviewed-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
parent b07bb761
...@@ -311,7 +311,6 @@ static int vmw_cotable_unbind(struct vmw_resource *res, ...@@ -311,7 +311,6 @@ static int vmw_cotable_unbind(struct vmw_resource *res,
struct vmw_private *dev_priv = res->dev_priv; struct vmw_private *dev_priv = res->dev_priv;
struct ttm_buffer_object *bo = val_buf->bo; struct ttm_buffer_object *bo = val_buf->bo;
struct vmw_fence_obj *fence; struct vmw_fence_obj *fence;
int ret;
if (list_empty(&res->mob_head)) if (list_empty(&res->mob_head))
return 0; return 0;
...@@ -328,7 +327,7 @@ static int vmw_cotable_unbind(struct vmw_resource *res, ...@@ -328,7 +327,7 @@ static int vmw_cotable_unbind(struct vmw_resource *res,
if (likely(fence != NULL)) if (likely(fence != NULL))
vmw_fence_obj_unreference(&fence); vmw_fence_obj_unreference(&fence);
return ret; return 0;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment