mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 22:34:33 +01:00
dma: convert dma_buf_fd() to FD_ADD()
Link: https://patch.msgid.link/[email protected] Signed-off-by: Christian Brauner <[email protected]>
This commit is contained in:
1 file changed
+1
-9
@@ -768,18 +768,10 @@ EXPORT_SYMBOL_NS_GPL(dma_buf_export, "DMA_BUF");
|
||||
*/
|
||||
int dma_buf_fd(struct dma_buf *dmabuf, int flags)
|
||||
{
|
||||
int fd;
|
||||
|
||||
if (!dmabuf || !dmabuf->file)
|
||||
return -EINVAL;
|
||||
|
||||
fd = get_unused_fd_flags(flags);
|
||||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
fd_install(fd, dmabuf->file);
|
||||
|
||||
return fd;
|
||||
return FD_ADD(flags, dmabuf->file);
|
||||
}
|
||||
EXPORT_SYMBOL_NS_GPL(dma_buf_fd, "DMA_BUF");
|
||||
|
||||
|
||||
Reference in new issue
Block a user