From: Jakob Bornecrantz Date: Thu, 3 Nov 2011 20:03:06 +0000 (+0100) Subject: vmwgfx: Unreference surface on cursor error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e5c8dbb8141e7da81bd8179929d1298302d17128;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git vmwgfx: Unreference surface on cursor error path Signed-off-by: Jakob Bornecrantz Reviewed-by: Thomas Hellstrom Signed-off-by: Dave Airlie --- 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 {