[PATCH] drm/ttm: Fix comment about return value of ttm_tt_init

Kenjiro Nakayama nakayamakenjiro at gmail.com
Tue Oct 24 05:10:46 UTC 2023


ttm_tt_init returns -ENOMEM when out of memory.

Signed-off-by: Kenjiro Nakayama <nakayamakenjiro at gmail.com>
---
 include/drm/ttm/ttm_tt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h
index a4eff85b1f44..243232be87b8 100644
--- a/include/drm/ttm/ttm_tt.h
+++ b/include/drm/ttm/ttm_tt.h
@@ -145,7 +145,7 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc);
  * Create a struct ttm_tt to back data with system memory pages.
  * No pages are actually allocated.
  * Returns:
- * NULL: Out of memory.
+ * -ENOMEM: Out of memory.
  */
 int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
 		uint32_t page_flags, enum ttm_caching caching,
-- 
2.41.0



More information about the dri-devel mailing list