mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
drm/tegra: Fix order of teardown in IOMMU case
The original code works fine, this is merely a cosmetic change to make the teardown order the reverse of the setup order. Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
27db6a0073
commit
5f43ac8d80
1 changed files with 4 additions and 4 deletions
|
|
@ -204,10 +204,10 @@ config:
|
|||
drm_mode_config_cleanup(drm);
|
||||
|
||||
if (tegra->domain) {
|
||||
iommu_domain_free(tegra->domain);
|
||||
drm_mm_takedown(&tegra->mm);
|
||||
mutex_destroy(&tegra->mm_lock);
|
||||
drm_mm_takedown(&tegra->mm);
|
||||
put_iova_domain(&tegra->carveout.domain);
|
||||
iommu_domain_free(tegra->domain);
|
||||
}
|
||||
free:
|
||||
kfree(tegra);
|
||||
|
|
@ -230,10 +230,10 @@ static void tegra_drm_unload(struct drm_device *drm)
|
|||
return;
|
||||
|
||||
if (tegra->domain) {
|
||||
iommu_domain_free(tegra->domain);
|
||||
drm_mm_takedown(&tegra->mm);
|
||||
mutex_destroy(&tegra->mm_lock);
|
||||
drm_mm_takedown(&tegra->mm);
|
||||
put_iova_domain(&tegra->carveout.domain);
|
||||
iommu_domain_free(tegra->domain);
|
||||
}
|
||||
|
||||
kfree(tegra);
|
||||
|
|
|
|||
Loading…
Reference in a new issue