OSDN Git Service

staging: vboxvideo: unlock on error in vbox_cursor_atomic_update()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 11 Oct 2018 07:59:41 +0000 (10:59 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Oct 2018 10:10:32 +0000 (12:10 +0200)
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 <dan.carpenter@oracle.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vboxvideo/vbox_mode.c

index 042e4f3..78a9c9b 100644 (file)
@@ -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;
        }