1
0
Fork 0

iommu/vt-d: Zero out allocated memory in dmar_enable_qi

kmemcheck complained about the use of uninitialized memory.
Fix by using kzalloc instead of kmalloc.

Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
hifive-unleashed-5.1
Hannes Reinecke 2013-02-06 09:50:10 +01:00 committed by Joerg Roedel
parent 88b62b915b
commit 37a407101e
1 changed files with 1 additions and 1 deletions

View File

@ -1040,7 +1040,7 @@ int dmar_enable_qi(struct intel_iommu *iommu)
qi->desc = page_address(desc_page);
qi->desc_status = kmalloc(QI_LENGTH * sizeof(int), GFP_ATOMIC);
qi->desc_status = kzalloc(QI_LENGTH * sizeof(int), GFP_ATOMIC);
if (!qi->desc_status) {
free_page((unsigned long) qi->desc);
kfree(qi);