summaryrefslogtreecommitdiff
path: root/drivers/base/dma-buf.c
diff options
context:
space:
mode:
authorBorislav Petkov <bp@alien8.de>2012-12-11 19:05:26 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-18 00:57:07 +0400
commitf5e097f0465e874ac76e8b6ae355b6faa83973a1 (patch)
tree03ca3e8762a68bee6d886fd148c3ac77ec5ba1b6 /drivers/base/dma-buf.c
parent1a5d76dbe825fa6deba3d8979bbd334ea17b6dcc (diff)
downloadlinux-f5e097f0465e874ac76e8b6ae355b6faa83973a1.tar.xz
dma_buf: Cleanup dma_buf_fd
Remove redundant 'error' variable. Signed-off-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/dma-buf.c')
-rw-r--r--drivers/base/dma-buf.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c
index a3f79c495a41..ff5b745c4705 100644
--- a/drivers/base/dma-buf.c
+++ b/drivers/base/dma-buf.c
@@ -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);