dri: fix kms_swrast screen fail

this should match all the other screen init functions

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30524>
(cherry picked from commit d6ac254c01)
This commit is contained in:
Mike Blumenkrantz 2024-07-30 14:47:25 -04:00 committed by Eric Engestrom
parent 262e3b3b6f
commit f3f0b87bf8
2 changed files with 3 additions and 3 deletions

View file

@ -2294,7 +2294,7 @@
"description": "dri: fix kms_swrast screen fail",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -2402,7 +2402,7 @@ dri_swrast_kms_init_screen(struct dri_screen *screen, bool driver_name_is_inferr
#endif
if (!pscreen)
goto fail;
return NULL;
dri_init_options(screen);
dri2_init_screen_extensions(screen, pscreen, true);
@ -2431,7 +2431,7 @@ dri_swrast_kms_init_screen(struct dri_screen *screen, bool driver_name_is_inferr
return configs;
fail:
dri_release_screen(screen);
pipe_loader_release(&screen->dev, 1);
#endif // GALLIUM_SOFTPIPE
return NULL;