egl/dri2: Fix missing return with dri2_egl_error_unlock.

Fix defect reported by Coverity Scan.

Double unlock (LOCK)
double_unlock: dri2_egl_error_unlock unlocks dri2_dpy->lock while it is unlocked.

Fixes: f1efe037df ("egl/dri2: Add display lock")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18655>
This commit is contained in:
Vinson Lee 2022-09-18 11:02:04 -07:00 committed by Marge Bot
parent a1faab0b90
commit 093b19b09a

View file

@ -2900,7 +2900,7 @@ dri2_query_dma_buf_modifiers(_EGLDisplay *disp, EGLint format,
return dri2_egl_error_unlock(dri2_dpy, EGL_BAD_PARAMETER, "invalid value for max count of formats");
if (max > 0 && modifiers == NULL)
dri2_egl_error_unlock(dri2_dpy, EGL_BAD_PARAMETER, "invalid modifiers array");
return dri2_egl_error_unlock(dri2_dpy, EGL_BAD_PARAMETER, "invalid modifiers array");
if (dri2_dpy->image->base.version < 15 ||
dri2_dpy->image->queryDmaBufModifiers == NULL) {