nouveau: handle early initialization errors
PATCH 1/1 nouveau: handle early initialization errors
handle very early errors in pipe_screen creation (failure of nouveau_screen_init in nv50_screen_create)
--- src/gallium/drivers/nouveau/nouveau_screen.c | 3 ++- .../winsys/nouveau/drm/nouveau_drm_winsys.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
src/gallium/drivers/nouveau/nouveau_screen.c +2 -1
@@ -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); }
src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c +2 -1
@@ -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); }
Signature · 1 line
1.7.1.1
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 25 lines · Marcin Slusarz
handle very early errors in
pipe_screencreation (failure ofnouveau_screen_initinnv50_screen_create)--- src/gallium/drivers/nouveau/nouveau_screen.c | 3 ++- .../winsys/nouveau/drm/nouveau_drm_winsys.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)src/gallium/drivers/nouveau/nouveau_screen.c +2
-1@@ -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); }src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c +0
-0
src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c nouveau_drm_destroy_winsys(struct pipe_winsys *s) · line 25
Quoted 8 lines
src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c +2
-1@@ -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); }
Thanks, pushed.
_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau