Commit f5e097f0 authored by Borislav Petkov's avatar Borislav Petkov Committed by Greg Kroah-Hartman

dma_buf: Cleanup dma_buf_fd

Remove redundant 'error' variable.
Signed-off-by: default avatarBorislav Petkov <bp@alien8.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment