Module: Mesa
Branch: master
Commit: cd340052adf4246284311f5262664ab8867396e2
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=cd340052adf4246284311f5262664ab8867396e2

Author: Eric Engestrom <e...@engestrom.ch>
Date:   Sun Aug 21 22:11:48 2016 +0100

st/va: add missing mutex_unlock

Fixes: c59628d11b134fc01638 ("st/va: enable dual instances encode by sync 
surface")

Signed-off-by: Eric Engestrom <e...@engestrom.ch>
Reviewed-by: Boyuan Zhang <boyuan.zh...@amd.com>
Reviewed-by: Christian König <christian.koe...@amd.com>

---

 src/gallium/state_trackers/va/surface.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/state_trackers/va/surface.c 
b/src/gallium/state_trackers/va/surface.c
index 012e48e..3ee1cdd 100644
--- a/src/gallium/state_trackers/va/surface.c
+++ b/src/gallium/state_trackers/va/surface.c
@@ -106,8 +106,10 @@ vlVaSyncSurface(VADriverContextP ctx, VASurfaceID 
render_target)
    pipe_mutex_lock(drv->mutex);
    surf = handle_table_get(drv->htab, render_target);
 
-   if (!surf || !surf->buffer)
+   if (!surf || !surf->buffer) {
+      pipe_mutex_unlock(drv->mutex);
       return VA_STATUS_ERROR_INVALID_SURFACE;
+   }
 
    context = handle_table_get(drv->htab, surf->ctx);
    if (!context) {

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to