If the specific initialize was successfull, dri2_egl_display() will
return a non NULL pointer. Thus we can drop the check and flatten the
codeflow.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Daniel Stone <daniels@collabora.com>
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;
}
/**