summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/drivers')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 83545bab227..02c187e5fe7 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -905,17 +905,13 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp)
return EGL_FALSE;
}
- if (ret) {
- dri2_dpy = dri2_egl_display(disp);
-
- if (!dri2_dpy) {
- return EGL_FALSE;
- }
+ if (!ret)
+ return EGL_FALSE;
- dri2_dpy->ref_count++;
- }
+ dri2_dpy = dri2_egl_display(disp);
+ dri2_dpy->ref_count++;
- return ret;
+ return EGL_TRUE;
}
/**