]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/gem: Improve drm_gem_objects_lookup() kerneldoc
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Mon, 16 Mar 2026 09:38:09 +0000 (09:38 +0000)
committerTvrtko Ursulin <tursulin@ursulin.net>
Wed, 25 Mar 2026 08:08:09 +0000 (08:08 +0000)
Make clear that the returned array has to be free using kvfree().

While at it, fix broken reference to non-existant @objs and allow for more
error codes on failure.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Cc: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
Link: https://lore.kernel.org/r/20260316093809.97267-1-tvrtko.ursulin@igalia.com
[tursulin: fixup spelling]

drivers/gpu/drm/drm_gem.c

index fdf08cae1c5befbcfcaa21917189f7bcc72bfc5c..0377a5fd402d07faccca3408a57eac52fd2c45d8 100644 (file)
@@ -821,13 +821,14 @@ err:
  * Takes an array of userspace handles and returns a newly allocated array of
  * GEM objects.
  *
- * For a single handle lookup, use drm_gem_object_lookup().
+ * After a successful lookup GEM objects need to be released using
+ * drm_gem_object_put() and the array returned in @objs_out must be freed using
+ * kvfree().
  *
- * Returns:
- * @objs filled in with GEM object pointers. Returned GEM objects need to be
- * released with drm_gem_object_put(). -ENOENT is returned on a lookup
- * failure. 0 is returned on success.
+ * For a single handle lookup, use drm_gem_object_lookup().
  *
+ * Return:
+ * Zero on success or a negative error code.
  */
 int drm_gem_objects_lookup(struct drm_file *filp, void __user *bo_handles,
                           int count, struct drm_gem_object ***objs_out)