iris: quiet down static analyzers
authorMarcin Ślusarz <marcin.slusarz@intel.com>
Fri, 24 Jul 2020 18:01:37 +0000 (20:01 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 30 Jul 2020 10:41:00 +0000 (10:41 +0000)
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6067>

src/gallium/drivers/iris/iris_bufmgr.c

index c781f99d4b5f71ab75a49b51913aa343e53b8294..98b1ca683b14c5d47ffbe40fd75488343aeb414c 100644 (file)
@@ -333,6 +333,8 @@ vma_free(struct iris_bufmgr *bufmgr,
    if (memzone == IRIS_MEMZONE_BINDER)
       return;
 
+   assert(memzone < ARRAY_SIZE(bufmgr->vma_allocator));
+
    util_vma_heap_free(&bufmgr->vma_allocator[memzone], address, size);
 }