dma_buf: Cleanup dma_buf_fd
authorBorislav Petkov <bp@alien8.de>
Tue, 11 Dec 2012 15:05:26 +0000 (16:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 20:57:07 +0000 (12:57 -0800)
Remove redundant 'error' variable.

Signed-off-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/dma-buf.c

index a3f79c495a411ea85b87604ab473fcef6b962558..ff5b745c470525c5e1a19560cb81be188a76100c 100644 (file)
@@ -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);