summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2011-11-03 21:03:06 +0100
committerDave Airlie <airlied@redhat.com>2011-11-07 13:16:14 +0000
commite5c8dbb8141e7da81bd8179929d1298302d17128 (patch)
tree53c42a405d17cc491bf469337ea13a840c64617e /drivers
parent55bde5b215ceb8356328f18cd82a77843bc4ffd3 (diff)
vmwgfx: Unreference surface on cursor error path
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_kms.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index 667437b037f3..66e92acb3c5b 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -111,6 +111,7 @@ int vmw_du_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,
if (!ret) {
if (!surface->snooper.image) {
DRM_ERROR("surface not suitable for cursor\n");
+ vmw_surface_unreference(&surface);
return -EINVAL;
}
} else {