The comment in dma_buf_llseek() referenced a "SEEK_END(0), SEEK_CUR(0)
pattern", but the implementation does not support SEEK_CUR - it only
handles SEEK_END and SEEK_SET, returning -EINVAL for anything else.

Replace SEEK_CUR with SEEK_SET in the comment so that it accurately
describes the supported idiomatic pattern.

Signed-off-by: Haojie Li <[email protected]>
---
 drivers/dma-buf/dma-buf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index d504c636dc29..60571a2ecc23 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -260,7 +260,7 @@ static loff_t dma_buf_llseek(struct file *file, loff_t 
offset, int whence)
 
        /* only support discovering the end of the buffer,
         * but also allow SEEK_SET to maintain the idiomatic
-        * SEEK_END(0), SEEK_CUR(0) pattern.
+        * SEEK_END(0), SEEK_SET(0) pattern.
         */
        if (whence == SEEK_END)
                base = dmabuf->size;
-- 
2.25.1

Reply via email to