Commit d2453b2c authored by Hiroshi Doyu's avatar Hiroshi Doyu Committed by Joerg Roedel

iommu/tegra: smmu: Cleanup with lesser nest

Small clean up with lesser nest for readability.
Signed-off-by: default avatarHiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent ba1eabfa
...@@ -814,11 +814,14 @@ static int smmu_iommu_domain_init(struct iommu_domain *domain) ...@@ -814,11 +814,14 @@ static int smmu_iommu_domain_init(struct iommu_domain *domain)
/* Look for a free AS with lock held */ /* Look for a free AS with lock held */
for (i = 0; i < smmu->num_as; i++) { for (i = 0; i < smmu->num_as; i++) {
as = &smmu->as[i]; as = &smmu->as[i];
if (!as->pdir_page) {
err = alloc_pdir(as); if (as->pdir_page)
if (!err) continue;
goto found;
} err = alloc_pdir(as);
if (!err)
goto found;
if (err != -EAGAIN) if (err != -EAGAIN)
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment