frontends/va: Fix missing unlock

Fix defect reported by Coverity Scan.

Missing unlock (LOCK)
missing_unlock: Returning without unlocking drv->mutex.

Fixes: af695149e9 ("frontends/va: pass in film_grain_target as new output")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23488>
This commit is contained in:
Vinson Lee 2023-06-06 23:16:19 -07:00 committed by Marge Bot
parent bb3cf3ff8e
commit e1d948b6a2

View file

@ -925,8 +925,10 @@ vlVaEndPicture(VADriverContextP ctx, VAContextID context_id)
mtx_lock(&drv->mutex);
surf = handle_table_get(drv->htab, output_id);
if (!surf || !surf->buffer)
if (!surf || !surf->buffer) {
mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SURFACE;
}
if (apply_av1_fg) {
surf->ctx = context_id;