summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorHiroshi Doyu <hdoyu@nvidia.com>2012-07-30 08:39:18 +0300
committerJoerg Roedel <joerg.roedel@amd.com>2012-08-03 16:04:44 +0200
commitd2453b2c7875dac9b323bff5d21981c41de177b1 (patch)
tree5a16f436810bd3d81a117e7920d190d535526fdb /drivers/iommu
parentba1eabfade3272596000bf3c62b68ca375e48b08 (diff)
downloadlinux-3.10-d2453b2c7875dac9b323bff5d21981c41de177b1.tar.gz
linux-3.10-d2453b2c7875dac9b323bff5d21981c41de177b1.tar.bz2
linux-3.10-d2453b2c7875dac9b323bff5d21981c41de177b1.zip
iommu/tegra: smmu: Cleanup with lesser nest
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>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/tegra-smmu.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index a9bf4c30cd8..37669cc483b 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -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;
}