iommu/tegra: smmu: Remove unnecessary sanity check at alloc_pdir()
authorHiroshi DOYU <hdoyu@nvidia.com>
Mon, 2 Jul 2012 11:26:37 +0000 (14:26 +0300)
committerJoerg Roedel <joerg.roedel@amd.com>
Tue, 17 Jul 2012 09:25:04 +0000 (11:25 +0200)
alloc_pdir() is called with smmu->as[?].pdir_page == NULL. No need to
check pdir_page again inside alloc_pdir().

Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/tegra-smmu.c

index becfc614cf9422e7e70bf66fc1e768012b002f85..68441fcca26171ffa74f58467fe762405ee04ac3 100644 (file)
@@ -562,9 +562,6 @@ static int alloc_pdir(struct smmu_as *as)
        u32 val;
        struct smmu_device *smmu = as->smmu;
 
-       if (as->pdir_page)
-               return 0;
-
        as->pte_count = devm_kzalloc(smmu->dev,
                     sizeof(as->pte_count[0]) * SMMU_PDIR_COUNT, GFP_KERNEL);
        if (!as->pte_count) {