Mesa (master): zink: return fail if create_instance fails

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 6 12:46:01 UTC 2020


Module: Mesa
Branch: master
Commit: 0b53ca0cca9381ad63a34753a3f678397ca56aac
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0b53ca0cca9381ad63a34753a3f678397ca56aac

Author: Duncan Hopkins <duncan.hopkins at foundry.com>
Date:   Fri Nov  6 08:02:21 2020 +0000

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 at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7471>

---

 src/gallium/drivers/zink/zink_screen.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index 75f7698c1bd..a310de78b59 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -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);
 



More information about the mesa-commit mailing list