aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2013-02-06 03:50:10 -0500
committerJoerg Roedel <joro@8bytes.org>2013-02-07 16:00:29 -0500
commit37a407101e08e444a193837a1e1d4f6f66c8dad4 (patch)
tree35998d20be539d31895842e93fed2f12f708a5e5 /drivers/iommu
parent88b62b915b0b7e25870eb0604ed9a92ba4bfc9f7 (diff)
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')
-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)
1040 1040
1041 qi->desc = page_address(desc_page); 1041 qi->desc = page_address(desc_page);
1042 1042
1043 qi->desc_status = kmalloc(QI_LENGTH * sizeof(int), GFP_ATOMIC); 1043 qi->desc_status = kzalloc(QI_LENGTH * sizeof(int), GFP_ATOMIC);
1044 if (!qi->desc_status) { 1044 if (!qi->desc_status) {
1045 free_page((unsigned long) qi->desc); 1045 free_page((unsigned long) qi->desc);
1046 kfree(qi); 1046 kfree(qi);