From c00e1d09e3053c6af6a7f6d405b5b455f247d5d4 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 11 Oct 2018 10:59:41 +0300 Subject: [PATCH] staging: vboxvideo: unlock on error in vbox_cursor_atomic_update() We need to unlock before returning on this error path. Fixes: 35f3288c453e ("staging: vboxvideo: Atomic phase 1: convert cursor to universal plane") Signed-off-by: Dan Carpenter Reviewed-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vboxvideo/vbox_mode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/vboxvideo/vbox_mode.c b/drivers/staging/vboxvideo/vbox_mode.c index 042e4f384df93..78a9c9b13ff61 100644 --- a/drivers/staging/vboxvideo/vbox_mode.c +++ b/drivers/staging/vboxvideo/vbox_mode.c @@ -424,6 +424,7 @@ static void vbox_cursor_atomic_update(struct drm_plane *plane, /* pinning is done in prepare/cleanup framebuffer */ src = vbox_bo_kmap(bo); if (IS_ERR(src)) { + mutex_unlock(&vbox->hw_mutex); DRM_WARN("Could not kmap cursor bo, skipping update\n"); return; } -- 2.30.2