From: Hiroshi Doyu Date: Mon, 30 Jul 2012 05:39:18 +0000 (+0300) Subject: iommu/tegra: smmu: Cleanup with lesser nest X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d2453b2c7875dac9b323bff5d21981c41de177b1;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git iommu/tegra: smmu: Cleanup with lesser nest Small clean up with lesser nest for readability. Signed-off-by: Hiroshi Doyu Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c index a9bf4c30cd84..37669cc483b1 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; }