summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2018-04-23 08:57:44 +0200
committerThierry Reding <treding@nvidia.com>2018-05-17 17:44:48 +0200
commit5f43ac8d80e4c768380e86d312a591472d080eeb (patch)
tree8e082c58fb5b2956b5ccdb142fd1d25decb295d0
parent27db6a0073f162cdb15975c9d29d159d772b1ec0 (diff)
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>
-rw-r--r--drivers/gpu/drm/tegra/drm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index 181e82c58a4f..7b9f73bcf155 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -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);