Commit a49167c1 authored by Marcin Slusarz's avatar Marcin Slusarz Committed by Francisco Jerez

nouveau: handle early initialization errors

handle very early errors in pipe_screen creation (failure of
nouveau_screen_init in nv50_screen_create)
Signed-off-by: default avatarFrancisco Jerez <currojerez@riseup.net>
parent bd25e23b
......@@ -258,6 +258,7 @@ nouveau_screen_fini(struct nouveau_screen *screen)
{
struct pipe_winsys *ws = screen->base.winsys;
nouveau_channel_free(&screen->channel);
ws->destroy(ws);
if (ws)
ws->destroy(ws);
}
......@@ -19,7 +19,8 @@ nouveau_drm_destroy_winsys(struct pipe_winsys *s)
{
struct nouveau_winsys *nv_winsys = nouveau_winsys(s);
struct nouveau_screen *nv_screen= nouveau_screen(nv_winsys->pscreen);
nouveau_device_close(&nv_screen->device);
if (nv_screen)
nouveau_device_close(&nv_screen->device);
FREE(nv_winsys);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment