Commit 4f97031f authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Joerg Roedel
Browse files

iommu/tegra-smmu: Properly release domain resources



Release all memory allocations associated with a released domain and emit
warning if domain is in-use at the time of destruction.

Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
Acked-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 43a0541e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -327,6 +327,9 @@ static void tegra_smmu_domain_free(struct iommu_domain *domain)

	/* TODO: free page directory and page tables */

	WARN_ON_ONCE(as->use_count);
	kfree(as->count);
	kfree(as->pts);
	kfree(as);
}