]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
dma_buf: Cleanup dma_buf_fd
authorBorislav Petkov <bp@alien8.de>
Tue, 11 Dec 2012 15:05:26 +0000 (16:05 +0100)
committerSumit Semwal <sumit.semwal@linaro.org>
Tue, 19 Feb 2013 10:23:22 +0000 (15:53 +0530)
Remove redundant 'error' variable.

Signed-off-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.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);