diff options
| author | Jonathan Cameron <jic23@kernel.org> | 2026-06-02 15:24:19 +0100 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-06-02 15:24:19 +0100 |
| commit | c82228f76aaa3f77eca3ac22670aa69dd0e59d40 (patch) | |
| tree | d04d0936d748104c004a69fe35fc63e0bd3cdfdd /drivers/dma-buf/dma-buf.c | |
| parent | 3f2d03ecf22b09da1d92ba06e1ba6e20d16060e9 (diff) | |
| parent | e43ffb69e0438cddd72aaa30898b4dc446f664f8 (diff) | |
| download | linux-next-c82228f76aaa3f77eca3ac22670aa69dd0e59d40.tar.gz linux-next-c82228f76aaa3f77eca3ac22670aa69dd0e59d40.zip | |
Merge tag 'v7.1-rc6' into work
Linux 7.1-rc6
Diffstat (limited to 'drivers/dma-buf/dma-buf.c')
| -rw-r--r-- | drivers/dma-buf/dma-buf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 71f37544a5c6..d504c636dc29 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -792,9 +792,13 @@ int dma_buf_fd(struct dma_buf *dmabuf, int flags) if (!dmabuf || !dmabuf->file) return -EINVAL; - fd = FD_ADD(flags, dmabuf->file); + fd = get_unused_fd_flags(flags); + if (fd < 0) + return fd; + DMA_BUF_TRACE(trace_dma_buf_fd, dmabuf, fd); + fd_install(fd, dmabuf->file); return fd; } EXPORT_SYMBOL_NS_GPL(dma_buf_fd, "DMA_BUF"); |
