Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH] dma-buf: fix stale return value documentation for dma_buf_set_name()
@ 2026-07-30  0:31 Hung-Chun Tseng
  2026-07-30  0:50 ` [PATCH v2] " Hung-Chun Tseng
  0 siblings, 1 reply; 2+ messages in thread
From: Hung-Chun Tseng @ 2026-07-30  0:31 UTC (permalink / raw)
  To: sumit.semwal, christian.koenig
  Cc: linux-media, dri-devel, linaro-mm-sig, linux-kernel,
	Hung-Chun Tseng

The kernel-doc for dma_buf_set_name() documents an -EBUSY return for the
case where the dma-buf is already attached to devices. The function has no
such path: it returns 0 on success, or the error from strndup_user().

kernel-doc does not validate prose, so scripts/kernel-doc does not report
this.

Signed-off-by: Hung-Chun Tseng <alan.tseng.cs@gmail.com>
---
 drivers/dma-buf/dma-buf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index d504c636d..324f4f0c8 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -413,8 +413,8 @@ static __poll_t dma_buf_poll(struct file *file, poll_table *poll)
  * @buf:    [in]     A piece of userspace memory that contains the name of
  *                   the dma-buf.
  *
- * Returns 0 on success. If the dma-buf buffer is already attached to
- * devices, return -EBUSY.
+ * Returns 0 on success, or a negative error code from strndup_user() if the
+ * name cannot be copied in.
  *
  */
 static long dma_buf_set_name(struct dma_buf *dmabuf, const char __user *buf)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-30  0:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30  0:31 [PATCH] dma-buf: fix stale return value documentation for dma_buf_set_name() Hung-Chun Tseng
2026-07-30  0:50 ` [PATCH v2] " Hung-Chun Tseng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox