Merge "iommu: msm: Check for failed allocation"
diff --git a/arch/arm/mach-msm/iommu_domains.c b/arch/arm/mach-msm/iommu_domains.c
index 5228abc..68ecdc8 100644
--- a/arch/arm/mach-msm/iommu_domains.c
+++ b/arch/arm/mach-msm/iommu_domains.c
@@ -431,6 +431,8 @@
 	data->npools = layout->npartitions;
 	data->domain_num = atomic_inc_return(&domain_nums);
 	data->domain = iommu_domain_alloc(bus, layout->domain_flags);
+	if (!data->domain)
+		goto out;
 
 	add_domain(data);