summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorKyongHo Cho <pullip.cho@samsung.com>2011-12-16 21:38:25 +0900
committerHiroshi DOYU <hdoyu@nvidia.com>2012-01-23 11:11:42 +0200
commit4bd432a08e242b1ae65cdb6b3d3b336e7d29ff63 (patch)
treede4f202a271431d56d9f14126f8baef7f99f5c1f /drivers/iommu
parenta4dfe39c1b5a195c01eda6a0dc262525d6998662 (diff)
iommu: Initialize domain->handler in iommu_domain_alloc()
Since it is not guaranteed that an iommu driver initializes in its domain_init() function, it must be initialized with NULL to prevent calling a function in an arbitrary location when iommu fault occurred. Signed-off-by: KyongHo Cho <pullip.cho@samsung.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 7cc3c65e3f0a..2198b2dbbcd3 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -143,7 +143,7 @@ struct iommu_domain *iommu_domain_alloc(struct bus_type *bus)
if (bus == NULL || bus->iommu_ops == NULL)
return NULL;
- domain = kmalloc(sizeof(*domain), GFP_KERNEL);
+ domain = kzalloc(sizeof(*domain), GFP_KERNEL);
if (!domain)
return NULL;