zink: return fail if create_instance fails

If create_instance() fails, returns to MESA as failed instead of contining in an bad state.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7471>
This commit is contained in:
Duncan Hopkins 2020-11-06 08:02:21 +00:00 committed by Duncan Hopkins
parent 6a96729448
commit 0b53ca0cca
1 changed files with 3 additions and 0 deletions

View File

@ -940,6 +940,9 @@ zink_internal_create_screen(struct sw_winsys *winsys, int fd, const struct pipe_
zink_debug = debug_get_option_zink_debug();
screen->instance = create_instance(screen);
if(!screen->instance)
goto fail;
screen->pdev = choose_pdev(screen->instance);
update_queue_props(screen);