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:
parent
49558b4713
commit
f3b8c0caca
|
@ -1685,7 +1685,6 @@ int vmw_kms_helper_dirty(struct vmw_private *dev_priv,
|
|||
struct drm_crtc *crtc;
|
||||
u32 num_units = 0;
|
||||
u32 i, k;
|
||||
int ret;
|
||||
|
||||
dirty->dev_priv = dev_priv;
|
||||
|
||||
|
@ -1711,7 +1710,7 @@ int vmw_kms_helper_dirty(struct vmw_private *dev_priv,
|
|||
if (!dirty->cmd) {
|
||||
DRM_ERROR("Couldn't reserve fifo space "
|
||||
"for dirty blits.\n");
|
||||
return ret;
|
||||
return -ENOMEM;
|
||||
}
|
||||
memset(dirty->cmd, 0, dirty->fifo_reserve_size);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user