Skip to content

Commit

Permalink
iommu/tegra: smmu: Cleanup with lesser nest
Browse files Browse the repository at this point in the history
Small clean up with lesser nest for readability.

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
  • Loading branch information
Hiroshi Doyu authored and Joerg Roedel committed Aug 3, 2012
1 parent ba1eabf commit d2453b2
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions drivers/iommu/tegra-smmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d2453b2

Please sign in to comment.