diff options
author | Hiroshi Doyu <hdoyu@nvidia.com> | 2012-07-30 07:39:18 +0200 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2012-08-03 18:53:51 -0700 |
commit | 26b826d9dd8d2026a4fac48aec6b3ad77527e04d (patch) | |
tree | a16f0066e683dcc07daa2b80d2de0bb8ea80842a /drivers/iommu | |
parent | b7e3b74fc7f5e624ab1b9de64932e54799353c35 (diff) |
iommu/tegra: smmu: Cleanup with lesser nest
Small clean up with lesser nest for readability.
[Hiroshi Doyu: Backport from the upstream.]
Change-Id: Ic23fc103a301b564f36544a03d5f5a6078543675
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Reviewed-on: http://git-master/r/120012
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/tegra-smmu.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c index 42d52cf12d0c..43052a327425 100644 --- a/drivers/iommu/tegra-smmu.c +++ b/drivers/iommu/tegra-smmu.c @@ -844,11 +844,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; } |