Fix defect reported by Coverity Scan.
Missing unlock (LOCK)
missing_unlock: Returning without unlocking drv->mutex.
Fixes:
af695149e96 ("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>
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;