mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 15:58:47 +00:00
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>
This commit is contained in:
parent
ba1eabfade
commit
d2453b2c78
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user