[Mesa-dev] [PATCH 01/10] gbm: remove unneeded null check

Emil Velikov emil.l.velikov at gmail.com
Mon Oct 16 15:54:19 UTC 2017


From: Emil Velikov <emil.velikov at collabora.com>

The presense of DRI_IMAGE is checked further up, at the start of the
function gbm_dri_bo_import().

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>

diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
index 0a4853bf63d..531361a04d9 100644
--- a/src/gbm/backends/dri/gbm_dri.c
+++ b/src/gbm/backends/dri/gbm_dri.c
@@ -977,7 +977,7 @@ gbm_dri_bo_import(struct gbm_device *gbm,
       int fourcc;
 
       /* Import with modifier requires createImageFromDmaBufs2 */
-      if (dri->image == NULL || dri->image->base.version < 15 ||
+      if (dri->image->base.version < 15 ||
           dri->image->createImageFromDmaBufs2 == NULL) {
          errno = ENOSYS;
          return NULL;
-- 
2.14.1



More information about the mesa-dev mailing list