egl: fold _eglError() + return EGL_FALSE
[mesa.git] / src / egl / main / eglcontext.c
index 05cc523c8d12d6f7ef408f7b606a7550a6171056..df8b45c7bd648762857bdc4278aba7c50a22d360 100644 (file)
@@ -489,10 +489,8 @@ _eglInitContext(_EGLContext *ctx, _EGLDisplay *dpy, _EGLConfig *conf,
    const EGLenum api = eglQueryAPI();
    EGLint err;
 
-   if (api == EGL_NONE) {
-      _eglError(EGL_BAD_MATCH, "eglCreateContext(no client API)");
-      return EGL_FALSE;
-   }
+   if (api == EGL_NONE)
+      return _eglError(EGL_BAD_MATCH, "eglCreateContext(no client API)");
 
    _eglInitResource(&ctx->Resource, sizeof(*ctx), dpy);
    ctx->ClientAPI = api;