Commit 0bdbf4cc authored by Hiroshi DOYU's avatar Hiroshi DOYU Committed by Joerg Roedel
Browse files

iommu/tegra: smmu: Remove unnecessary sanity check at alloc_pdir()



alloc_pdir() is called with smmu->as[?].pdir_page == NULL. No need to
check pdir_page again inside alloc_pdir().

Signed-off-by: default avatarHiroshi DOYU <hdoyu@nvidia.com>
Acked-by: default avatarStephen Warren <swarren@wwwdotorg.org>
Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent ff763629
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -562,9 +562,6 @@ static int alloc_pdir(struct smmu_as *as)
	u32 val;
	u32 val;
	struct smmu_device *smmu = as->smmu;
	struct smmu_device *smmu = as->smmu;


	if (as->pdir_page)
		return 0;

	as->pte_count = devm_kzalloc(smmu->dev,
	as->pte_count = devm_kzalloc(smmu->dev,
		     sizeof(as->pte_count[0]) * SMMU_PDIR_COUNT, GFP_KERNEL);
		     sizeof(as->pte_count[0]) * SMMU_PDIR_COUNT, GFP_KERNEL);
	if (!as->pte_count) {
	if (!as->pte_count) {