summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm/iommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-msm/iommu.c')
-rw-r--r--arch/arm/mach-msm/iommu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/iommu.c b/arch/arm/mach-msm/iommu.c
index 74f2157eba4e..67e8f531b7af 100644
--- a/arch/arm/mach-msm/iommu.c
+++ b/arch/arm/mach-msm/iommu.c
@@ -241,6 +241,11 @@ static int msm_iommu_attach_dev(struct iommu_domain *domain, struct device *dev)
goto fail;
}
+ if (!list_empty(&ctx_drvdata->attached_elm)) {
+ ret = -EBUSY;
+ goto fail;
+ }
+
list_for_each_entry(tmp_drvdata, &priv->list_attached, attached_elm)
if (tmp_drvdata == ctx_drvdata) {
ret = -EBUSY;