summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorKyongHo Cho <pullip.cho@samsung.com>2011-12-16 21:38:25 +0900
committerJoerg Roedel <joerg.roedel@amd.com>2011-12-16 15:05:13 +0100
commit8bd6960c6ae65d7f92bfb708154ee813417d7b26 (patch)
tree97ef8b4067aac573b76b1c6cc58588aee30e1f56 /drivers/iommu
parentb2c1639135c0fc1560f3fe9a3a83f2c8265a9e02 (diff)
downloadlinux-rpi-8bd6960c6ae65d7f92bfb708154ee813417d7b26.tar.gz
linux-rpi-8bd6960c6ae65d7f92bfb708154ee813417d7b26.tar.bz2
linux-rpi-8bd6960c6ae65d7f92bfb708154ee813417d7b26.zip
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 2fb2963df553..5b5fa5cdaa31 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -90,7 +90,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;