summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/dmar.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2013-02-06 09:50:10 +0100
committerJoerg Roedel <joro@8bytes.org>2013-02-07 22:00:29 +0100
commit37a407101e08e444a193837a1e1d4f6f66c8dad4 (patch)
tree35998d20be539d31895842e93fed2f12f708a5e5 /drivers/iommu/dmar.c
parent88b62b915b0b7e25870eb0604ed9a92ba4bfc9f7 (diff)
downloadlinux-37a407101e08e444a193837a1e1d4f6f66c8dad4.tar.bz2
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>
Diffstat (limited to 'drivers/iommu/dmar.c')
-rw-r--r--drivers/iommu/dmar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index 86e2f4a62b9a..2623a570ad2f 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -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);