intel: devinfo: silence coverity warning
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 9 May 2018 14:08:03 +0000 (15:08 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 9 May 2018 14:21:01 +0000 (15:21 +0100)
It's just not possible to have a device with no subslices.

CID: 1433511
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
src/intel/dev/gen_device_info.c

index aa72d96e17890d98e0be23a75f0fae6c1f48a9a4..653cece6d70761f1cac5decef1d1853262e6c3f1 100644 (file)
@@ -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;