summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2016-05-16 14:43:26 -0700
committerMatt Turner <[email protected]>2016-05-18 11:09:37 -0700
commit53f64a84047b3f2766e490311c925a36afc64807 (patch)
tree1e7df38944857681d0a5b0cf835ab5b2ed2f1e89 /src/egl
parentb1e6d069daeda87cb7e14a45a0e4438cc0b399d0 (diff)
egl/dri2: Don't check return result of mtx_unlock().
Coverity (CID 1358496) warns that the cleanup code doesn't unlock the mutex (which is arguably kind of stupid, since the only case that can happen is when mtx_unlock() failed!). But, mtx_unlock() isn't going to fail -- the mutex was locked by this thread just a few lines above it.
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index d8448f4fc0f..65a3a62cf67 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -2585,10 +2585,7 @@ dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
ret = cnd_wait(&dri2_sync->cond, &dri2_sync->mutex);
- if (mtx_unlock(&dri2_sync->mutex)) {
- ret = EGL_FALSE;
- goto cleanup;
- }
+ mtx_unlock(&dri2_sync->mutex);
if (ret) {
_eglError(EGL_BAD_PARAMETER, "eglClientWaitSyncKHR");
@@ -2619,10 +2616,7 @@ dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
ret = cnd_timedwait(&dri2_sync->cond, &dri2_sync->mutex, &expire);
- if (mtx_unlock(&dri2_sync->mutex)) {
- ret = EGL_FALSE;
- goto cleanup;
- }
+ mtx_unlock(&dri2_sync->mutex);
if (ret)
if (ret == thrd_busy) {