diff options
author | Christian Engelmayer <cengelma@gmx.at> | 2015-09-19 01:31:10 +0300 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2015-09-24 10:20:37 +0300 |
commit | 49558b471369e790650df8706b5608fee27af42c (patch) | |
tree | e9c4465c6d17828723ecdb4fc089eb28b4f515e8 /drivers | |
parent | b07bb761cf6a333b2108cdbe4ffee66407189bb1 (diff) | |
download | linux-49558b471369e790650df8706b5608fee27af42c.tar.xz |
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: Christian Engelmayer <cengelma@gmx.at>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c index ce659a125f2b..092ea81eeff7 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c @@ -311,7 +311,6 @@ static int vmw_cotable_unbind(struct vmw_resource *res, struct vmw_private *dev_priv = res->dev_priv; struct ttm_buffer_object *bo = val_buf->bo; struct vmw_fence_obj *fence; - int ret; if (list_empty(&res->mob_head)) return 0; @@ -328,7 +327,7 @@ static int vmw_cotable_unbind(struct vmw_resource *res, if (likely(fence != NULL)) vmw_fence_obj_unreference(&fence); - return ret; + return 0; } /** |