diff options
author | Hannes Reinecke <hare@suse.de> | 2013-02-06 09:50:10 +0100 |
---|---|---|
committer | Joerg Roedel <joro@8bytes.org> | 2013-02-07 22:00:29 +0100 |
commit | 37a407101e08e444a193837a1e1d4f6f66c8dad4 (patch) | |
tree | 35998d20be539d31895842e93fed2f12f708a5e5 /drivers/iommu/dmar.c | |
parent | 88b62b915b0b7e25870eb0604ed9a92ba4bfc9f7 (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/dmar.c')
-rw-r--r-- | drivers/iommu/dmar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 86e2f4a62b9..2623a570ad2 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); |