提交 f5e097f0 编写于 作者: B Borislav Petkov 提交者: Greg Kroah-Hartman

dma_buf: Cleanup dma_buf_fd

Remove redundant 'error' variable.
Signed-off-by: NBorislav Petkov <bp@alien8.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 1a5d76db
......@@ -134,15 +134,14 @@ EXPORT_SYMBOL_GPL(dma_buf_export);
*/
int dma_buf_fd(struct dma_buf *dmabuf, int flags)
{
int error, fd;
int fd;
if (!dmabuf || !dmabuf->file)
return -EINVAL;
error = get_unused_fd_flags(flags);
if (error < 0)
return error;
fd = error;
fd = get_unused_fd_flags(flags);
if (fd < 0)
return fd;
fd_install(fd, dmabuf->file);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册