aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/iommu/shmobile-iommu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iommu/shmobile-iommu.c b/drivers/iommu/shmobile-iommu.c
index d572863dfccd..7a3b928fad1c 100644
--- a/drivers/iommu/shmobile-iommu.c
+++ b/drivers/iommu/shmobile-iommu.c
@@ -380,14 +380,13 @@ int ipmmu_iommu_init(struct shmobile_ipmmu *ipmmu)
380 kmem_cache_destroy(l1cache); 380 kmem_cache_destroy(l1cache);
381 return -ENOMEM; 381 return -ENOMEM;
382 } 382 }
383 archdata = kmalloc(sizeof(*archdata), GFP_KERNEL); 383 archdata = kzalloc(sizeof(*archdata), GFP_KERNEL);
384 if (!archdata) { 384 if (!archdata) {
385 kmem_cache_destroy(l1cache); 385 kmem_cache_destroy(l1cache);
386 kmem_cache_destroy(l2cache); 386 kmem_cache_destroy(l2cache);
387 return -ENOMEM; 387 return -ENOMEM;
388 } 388 }
389 spin_lock_init(&archdata->attach_lock); 389 spin_lock_init(&archdata->attach_lock);
390 archdata->attached = NULL;
391 archdata->ipmmu = ipmmu; 390 archdata->ipmmu = ipmmu;
392 ipmmu_archdata = archdata; 391 ipmmu_archdata = archdata;
393 bus_set_iommu(&platform_bus_type, &shmobile_iommu_ops); 392 bus_set_iommu(&platform_bus_type, &shmobile_iommu_ops);