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>
This commit is contained in:
Mike Blumenkrantz 2024-07-30 14:47:25 -04:00 committed by Marge Bot
parent d4ab6e15aa
commit d6ac254c01

View file

@ -2119,7 +2119,7 @@ dri_swrast_kms_init_screen(struct dri_screen *screen, bool driver_name_is_inferr
#endif
if (!pscreen)
goto fail;
return NULL;
configs = dri_init_screen(screen, pscreen);
if (!configs)
@ -2132,7 +2132,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 // HAVE_SWRAST
return NULL;