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)
/* Look for a free AS with lock held */
for (i = 0; i < smmu->num_as; i++) {
as = &smmu->as[i];
if (!as->pdir_page) {
err = alloc_pdir(as);
if (!err)
goto found;
}
if (as->pdir_page)
continue;
err = alloc_pdir(as);
if (!err)
goto found;
if (err != -EAGAIN)
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