aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Engelmayer <cengelma@gmx.at>2015-09-18 18:31:10 -0400
committerThomas Hellstrom <thellstrom@vmware.com>2015-09-24 03:20:37 -0400
commit49558b471369e790650df8706b5608fee27af42c (patch)
treee9c4465c6d17828723ecdb4fc089eb28b4f515e8
parentb07bb761cf6a333b2108cdbe4ffee66407189bb1 (diff)
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>
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c3
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,
311 struct vmw_private *dev_priv = res->dev_priv; 311 struct vmw_private *dev_priv = res->dev_priv;
312 struct ttm_buffer_object *bo = val_buf->bo; 312 struct ttm_buffer_object *bo = val_buf->bo;
313 struct vmw_fence_obj *fence; 313 struct vmw_fence_obj *fence;
314 int ret;
315 314
316 if (list_empty(&res->mob_head)) 315 if (list_empty(&res->mob_head))
317 return 0; 316 return 0;
@@ -328,7 +327,7 @@ static int vmw_cotable_unbind(struct vmw_resource *res,
328 if (likely(fence != NULL)) 327 if (likely(fence != NULL))
329 vmw_fence_obj_unreference(&fence); 328 vmw_fence_obj_unreference(&fence);
330 329
331 return ret; 330 return 0;
332} 331}
333 332
334/** 333/**