drm/vmwgfx: Fix uninitialized return in vmw_kms_helper_dirty()

Function vmw_kms_helper_dirty() 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 1324255.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
This commit is contained in:
Christian Engelmayer 2015-09-19 00:32:24 +02:00 committed by Thomas Hellstrom
parent 49558b4713
commit f3b8c0caca
1 changed files with 1 additions and 2 deletions

View File

@ -1685,7 +1685,6 @@ int vmw_kms_helper_dirty(struct vmw_private *dev_priv,
struct drm_crtc *crtc; struct drm_crtc *crtc;
u32 num_units = 0; u32 num_units = 0;
u32 i, k; u32 i, k;
int ret;
dirty->dev_priv = dev_priv; dirty->dev_priv = dev_priv;
@ -1711,7 +1710,7 @@ int vmw_kms_helper_dirty(struct vmw_private *dev_priv,
if (!dirty->cmd) { if (!dirty->cmd) {
DRM_ERROR("Couldn't reserve fifo space " DRM_ERROR("Couldn't reserve fifo space "
"for dirty blits.\n"); "for dirty blits.\n");
return ret; return -ENOMEM;
} }
memset(dirty->cmd, 0, dirty->fifo_reserve_size); memset(dirty->cmd, 0, dirty->fifo_reserve_size);
} }