diff --git a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
index 4f448d8cf30d..63a582de9ea9 100644
--- a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
+++ b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
@@ -317,5 +317,27 @@ void ttm_test_devices_fini(struct kunit *test)
 }
 EXPORT_SYMBOL_GPL(ttm_test_devices_fini);
 
+static void kunit_action_ttm_tt_fini(void *ptr)
+{
+	struct ttm_tt *ttm = ptr;
+
+	ttm_tt_fini(ttm);
+}
+
+int ttm_tt_init_kunit(struct kunit *test,
+		      struct ttm_tt *ttm, struct ttm_buffer_object *bo,
+		      uint32_t page_flags, enum ttm_caching caching,
+		      unsigned long extra_pages)
+{
+	int ret;
+
+	ret = ttm_tt_init(ttm, bo, page_flags, caching, extra_pages);
+	if (ret)
+		return ret;
+
+	return kunit_add_action_or_reset(test, kunit_action_ttm_tt_fini, ttm);
+}
+EXPORT_SYMBOL(ttm_tt_init_kunit);
+
 MODULE_DESCRIPTION("TTM KUnit test helper functions");
 MODULE_LICENSE("GPL and additional rights");
diff --git a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h
index c7da23232ffa..254d96a9adda 100644
--- a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h
+++ b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h
@@ -52,4 +52,9 @@ int ttm_test_devices_init(struct kunit *test);
 int ttm_test_devices_all_init(struct kunit *test);
 void ttm_test_devices_fini(struct kunit *test);
 
+int ttm_tt_init_kunit(struct kunit *test,
+		      struct ttm_tt *ttm, struct ttm_buffer_object *bo,
+		      uint32_t page_flags, enum ttm_caching caching,
+		      unsigned long extra_pages);
+
 #endif // TTM_KUNIT_HELPERS_H
diff --git a/drivers/gpu/drm/ttm/tests/ttm_tt_test.c b/drivers/gpu/drm/ttm/tests/ttm_tt_test.c
index 61ec6f580b62..2ba0f346fba8 100644
--- a/drivers/gpu/drm/ttm/tests/ttm_tt_test.c
+++ b/drivers/gpu/drm/ttm/tests/ttm_tt_test.c
@@ -52,7 +52,7 @@ static void ttm_tt_init_basic(struct kunit *test)
 
 	bo = ttm_bo_kunit_init(test, test->priv, params->size, NULL);
 
-	err = ttm_tt_init(tt, bo, page_flags, caching, extra_pages);
+	err = ttm_tt_init_kunit(test, tt, bo, page_flags, caching, extra_pages);
 	KUNIT_ASSERT_EQ(test, err, 0);
 
 	KUNIT_ASSERT_EQ(test, tt->num_pages, num_pages + extra_pages);
@@ -81,7 +81,7 @@ static void ttm_tt_init_misaligned(struct kunit *test)
 	/* Make the object size misaligned */
 	bo->base.size += 1;
 
-	err = ttm_tt_init(tt, bo, 0, caching, 0);
+	err = ttm_tt_init_kunit(test, tt, bo, 0, caching, 0);
 	KUNIT_ASSERT_EQ(test, err, 0);
 
 	KUNIT_ASSERT_EQ(test, tt->num_pages, num_pages);
@@ -99,7 +99,7 @@ static void ttm_tt_fini_basic(struct kunit *test)
 
 	bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
 
-	err = ttm_tt_init(tt, bo, 0, caching, 0);
+	err = ttm_tt_init_kunit(test, tt, bo, 0, caching, 0);
 	KUNIT_ASSERT_EQ(test, err, 0);
 	KUNIT_ASSERT_NOT_NULL(test, tt->pages);
 
@@ -140,7 +140,7 @@ static void ttm_tt_fini_shmem(struct kunit *test)
 
 	bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
 
-	err = ttm_tt_init(tt, bo, 0, caching, 0);
+	err = ttm_tt_init_kunit(test, tt, bo, 0, caching, 0);
 	KUNIT_ASSERT_EQ(test, err, 0);
 
 	shmem = shmem_file_setup("ttm swap", BO_SIZE, 0);
@@ -197,7 +197,7 @@ static void ttm_tt_create_ttm_exists(struct kunit *test)
 
 	bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
 
-	err = ttm_tt_init(tt, bo, 0, caching, 0);
+	err = ttm_tt_init_kunit(test, tt, bo, 0, caching, 0);
 	KUNIT_ASSERT_EQ(test, err, 0);
 	bo->ttm = tt;
 
@@ -280,7 +280,7 @@ static void ttm_tt_populate_populated_ttm(struct kunit *test)
 	tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL);
 	KUNIT_ASSERT_NOT_NULL(test, tt);
 
-	err = ttm_tt_init(tt, bo, 0, ttm_cached, 0);
+	err = ttm_tt_init_kunit(test, tt, bo, 0, ttm_cached, 0);
 	KUNIT_ASSERT_EQ(test, err, 0);
 
 	err = ttm_tt_populate(devs->ttm_dev, tt, &ctx);
@@ -304,7 +304,7 @@ static void ttm_tt_unpopulate_basic(struct kunit *test)
 	tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL);
 	KUNIT_ASSERT_NOT_NULL(test, tt);
 
-	err = ttm_tt_init(tt, bo, 0, ttm_cached, 0);
+	err = ttm_tt_init_kunit(test, tt, bo, 0, ttm_cached, 0);
 	KUNIT_ASSERT_EQ(test, err, 0);
 
 	err = ttm_tt_populate(devs->ttm_dev, tt, &ctx);
@@ -327,7 +327,7 @@ static void ttm_tt_unpopulate_empty_ttm(struct kunit *test)
 	tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL);
 	KUNIT_ASSERT_NOT_NULL(test, tt);
 
-	err = ttm_tt_init(tt, bo, 0, ttm_cached, 0);
+	err = ttm_tt_init_kunit(test, tt, bo, 0, ttm_cached, 0);
 	KUNIT_ASSERT_EQ(test, err, 0);
 
 	ttm_tt_unpopulate(devs->ttm_dev, tt);
@@ -348,7 +348,7 @@ static void ttm_tt_swapin_basic(struct kunit *test)
 	tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL);
 	KUNIT_ASSERT_NOT_NULL(test, tt);
 
-	err = ttm_tt_init(tt, bo, 0, ttm_cached, 0);
+	err = ttm_tt_init_kunit(test, tt, bo, 0, ttm_cached, 0);
 	KUNIT_ASSERT_EQ(test, err, 0);
 
 	err = ttm_tt_populate(devs->ttm_dev, tt, &ctx);
