diff options
author | Hiroshi Doyu <hdoyu@nvidia.com> | 2012-07-30 01:39:18 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2012-08-03 10:04:44 -0400 |
commit | d2453b2c7875dac9b323bff5d21981c41de177b1 (patch) | |
tree | 5a16f436810bd3d81a117e7920d190d535526fdb /drivers/iommu | |
parent | ba1eabfade3272596000bf3c62b68ca375e48b08 (diff) |
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.c | 13 |
1 files changed, 8 insertions, 5 deletions
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) | |||
814 | /* Look for a free AS with lock held */ | 814 | /* Look for a free AS with lock held */ |
815 | for (i = 0; i < smmu->num_as; i++) { | 815 | for (i = 0; i < smmu->num_as; i++) { |
816 | as = &smmu->as[i]; | 816 | as = &smmu->as[i]; |
817 | if (!as->pdir_page) { | 817 | |
818 | err = alloc_pdir(as); | 818 | if (as->pdir_page) |
819 | if (!err) | 819 | continue; |
820 | goto found; | 820 | |
821 | } | 821 | err = alloc_pdir(as); |
822 | if (!err) | ||
823 | goto found; | ||
824 | |||
822 | if (err != -EAGAIN) | 825 | if (err != -EAGAIN) |
823 | break; | 826 | break; |
824 | } | 827 | } |