summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTopi Pohjolainen <topi.pohjolainen@intel.com>2018-04-05 10:38:46 +0300
committerTopi Pohjolainen <topi.pohjolainen@intel.com>2018-04-11 01:49:56 +0300
commit26f48fe01092e2fb05daaa5090ac69f8a86a2cfd (patch)
tree20e0ac7fef3b89959946ab6793347441412c1a23
parent8960903c90e65c4d824e4ec247e5135d6909caa1 (diff)
intel/dev: Assert the number of slices is not zero
Fixes: c1900f5b intel: devinfo: add helper functions to fill... CID: 1433511 Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
-rw-r--r--src/intel/dev/gen_device_info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/dev/gen_device_info.c b/src/intel/dev/gen_device_info.c
index f7cb94f179..dfeab6e606 100644
--- a/src/intel/dev/gen_device_info.c
+++ b/src/intel/dev/gen_device_info.c
@@ -1047,7 +1047,7 @@ gen_device_info_update_from_topology(struct gen_device_info *devinfo,
/* We expect the total number of EUs to be uniformly distributed throughout
* the subslices.
*/
- assert((n_eus % n_subslices) == 0);
+ assert(n_subslices && (n_eus % n_subslices) == 0);
devinfo->num_eu_per_subslice = n_eus / n_subslices;
}