Mesa (master): intel: devinfo: silence coverity warning

Lionel Landwerlin llandwerlin at kemper.freedesktop.org
Wed May 9 14:22:58 UTC 2018


Module: Mesa
Branch: master
Commit: 11d36c373adcb62016dce9a250120299cfb6e7d8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=11d36c373adcb62016dce9a250120299cfb6e7d8

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Wed May  9 15:08:03 2018 +0100

intel: devinfo: silence coverity warning

It's just not possible to have a device with no subslices.

CID: 1433511
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli at intel.com>

---

 src/intel/dev/gen_device_info.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/intel/dev/gen_device_info.c b/src/intel/dev/gen_device_info.c
index aa72d96e17..653cece6d7 100644
--- a/src/intel/dev/gen_device_info.c
+++ b/src/intel/dev/gen_device_info.c
@@ -1034,6 +1034,7 @@ gen_device_info_update_from_topology(struct gen_device_info *devinfo,
       }
       n_subslices += devinfo->num_subslices[s];
    }
+   assert(n_subslices > 0);
 
    uint32_t eu_mask_len =
       topology->eu_stride * topology->max_subslices * topology->max_slices;




More information about the mesa-commit mailing list