gbm: Drop redundant extension error checks.
authorEmma Anholt <emma@anholt.net>
Tue, 29 Nov 2022 19:09:05 +0000 (11:09 -0800)
committerMarge Bot <emma+marge@anholt.net>
Mon, 5 Dec 2022 19:26:41 +0000 (19:26 +0000)
loader_bind_extensions error handling has already made sure these are
present.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069>

src/gbm/backends/dri/gbm_dri.c

index a38de440c49092eea185182f5dd8c5f9c04d76b8..e7e0dfbe4e1164e800b2541fcb20f8e3ea64261a 100644 (file)
@@ -390,9 +390,6 @@ dri_screen_create_dri2(struct gbm_dri_device *dri, char *driver_name)
 
    dri->loader_extensions = gbm_dri_screen_extensions;
 
-   if (dri->dri2 == NULL)
-      return -1;
-
    dri->screen = dri->dri2->createNewScreen2(0, dri->base.v0.fd,
                                              dri->loader_extensions,
                                              dri->driver_extensions,
@@ -436,9 +433,6 @@ dri_screen_create_swrast(struct gbm_dri_device *dri)
 
    dri->loader_extensions = gbm_dri_screen_extensions;
 
-   if (dri->swrast == NULL)
-      return -1;
-
    dri->screen = dri->swrast->createNewScreen2(0, dri->loader_extensions,
                                                dri->driver_extensions,
                                                &dri->driver_configs, dri);