Skip to contentSkip to conversation

drm: correct comments

PATCH In review Liu Zixian 2 participants 2 messages Jul 15, 2022 – Jul 16, 2022

Subsystems (2)
lore
Share & tools
lore

Liu Zixian

author
#0 lore raw

PATCH 1/1 drm: correct comments

On failure, these functions return errno, not NULL.

---
 drivers/gpu/drm/drm_gem_shmem_helper.c | 2 +-
 include/drm/drm_gem_shmem_helper.h     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_gem_shmem_helper.c +1 -1
index 8ad0e0299..37009418c 100644
@@ -662,7 +662,7 @@ EXPORT_SYMBOL(drm_gem_shmem_print_info);
  * drm_gem_shmem_get_pages_sgt() instead.
  *
  * Returns:
- * A pointer to the scatter/gather table of pinned pages or NULL on failure.
+ * A pointer to the scatter/gather table of pinned pages or errno on failure.
  */
 struct sg_table *drm_gem_shmem_get_sg_table(struct drm_gem_shmem_object *shmem)
 {
include/drm/drm_gem_shmem_helper.h +1 -1
index d0a57853c..0122e4075 100644
@@ -210,7 +210,7 @@ static inline void drm_gem_shmem_object_unpin(struct drm_gem_object *obj)
  * use it as their &drm_gem_object_funcs.get_sg_table handler.
  *
  * Returns:
- * A pointer to the scatter/gather table of pinned pages or NULL on failure.
+ * A pointer to the scatter/gather table of pinned pages or errno on failure.
  */
 static inline struct sg_table *drm_gem_shmem_object_get_sg_table(struct drm_gem_object *obj)
 {
Signature · 1 line
2.33.0
#1 lore raw

Hi,

Quoted 1 line · Liu Zixian

On failure, these functions return errno, not NULL.

They don't return an errno but an error pointer

Maxime