summaryrefslogtreecommitdiffstats
path: root/arch/x86/events/amd/iommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/events/amd/iommu.c')
-rw-r--r--arch/x86/events/amd/iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/events/amd/iommu.c b/arch/x86/events/amd/iommu.c
index 38b5d41b0c37..3210fee27e7f 100644
--- a/arch/x86/events/amd/iommu.c
+++ b/arch/x86/events/amd/iommu.c
@@ -387,7 +387,7 @@ static __init int _init_events_attrs(void)
while (amd_iommu_v2_event_descs[i].attr.attr.name)
i++;
- attrs = kzalloc(sizeof(struct attribute **) * (i + 1), GFP_KERNEL);
+ attrs = kcalloc(i + 1, sizeof(struct attribute **), GFP_KERNEL);
if (!attrs)
return -ENOMEM;