Message ID | 077dda72f2e43ae0ea5794f4d403eddd225c87e4.1661331102.git.rahul.singh@arm.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | xen/arm: smmuv3: Merge Linux fixes to Xen | expand |
diff --git a/xen/drivers/passthrough/arm/smmu-v3.c b/xen/drivers/passthrough/arm/smmu-v3.c index 900149d0fa..e074d7806f 100644 --- a/xen/drivers/passthrough/arm/smmu-v3.c +++ b/xen/drivers/passthrough/arm/smmu-v3.c @@ -1929,10 +1929,10 @@ static int arm_smmu_init_l1_strtab(struct arm_smmu_device *smmu) { unsigned int i; struct arm_smmu_strtab_cfg *cfg = &smmu->strtab_cfg; - size_t size = sizeof(*cfg->l1_desc) * cfg->num_l1_ents; void *strtab = smmu->strtab_cfg.strtab; - cfg->l1_desc = _xzalloc(size, sizeof(void *)); + cfg->l1_desc = _xzalloc_array(sizeof(*cfg->l1_desc), sizeof(void *), + cfg->num_l1_ents); if (!cfg->l1_desc) return -ENOMEM;