egl/dri2: In dri2_make_current, return early on failure
authorChad Versace <chadversary@chromium.org>
Sat, 7 Apr 2018 20:01:15 +0000 (13:01 -0700)
committerChad Versace <chadversary@chromium.org>
Tue, 7 Aug 2018 18:11:05 +0000 (11:11 -0700)
commiteabf59791e6fc553d1a882341dfca628cd5fc66d
treec7821589c6616683416f529820f585405c867592
parentf48f9a78da24df762ffceab9c0c136a500a4e316
egl/dri2: In dri2_make_current, return early on failure

This pulls an 'else' block into the function's main body, making the
code easier to follow.

Without this change, the upcoming EGL_KHR_mutable_render_buffer patch
transforms dri2_make_current() into spaghetti.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/egl/drivers/dri2/egl_dri2.c