Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5926ad7c authored by Chintan Pandya's avatar Chintan Pandya
Browse files

iommu: msm: refine the check for double attach cases



MSM IOMMU driver wants to check if any dynamic domain is
getting double attach or not. For the same, present check
is wrong and gives -EBUSY for the very first dynamic_attach
as by default asid field can be 0. Fix this bug by re-writing
the condition properly.

Change-Id: I658de5630ac61d3e0a1c0c9a14854b47b1f6adee
Signed-off-by: default avatarChintan Pandya <cpandya@codeaurora.org>
parent 9d19a050
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -996,7 +996,7 @@ static int msm_iommu_dynamic_attach(struct iommu_domain *domain,
	priv = domain->priv;

	/* Check if the domain is already attached or not */
	if (priv->asid < MAX_ASID)
	if (priv->asid < MAX_ASID && priv->asid > 0)
		return -EBUSY;

	ret = idr_alloc_cyclic(&iommu_drvdata->asid_idr, priv,