From: Topi Pohjolainen Date: Thu, 5 Apr 2018 07:38:46 +0000 (+0300) Subject: intel/dev: Assert the number of slices is not zero X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=26f48fe01092e2fb05daaa5090ac69f8a86a2cfd;p=mesa.git 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 Signed-off-by: Topi Pohjolainen --- diff --git a/src/intel/dev/gen_device_info.c b/src/intel/dev/gen_device_info.c index f7cb94f1795..dfeab6e6060 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; }