Skip to content

Commit

Permalink
dma_buf: Cleanup dma_buf_fd
Browse files Browse the repository at this point in the history
Remove redundant 'error' variable.

Signed-off-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Borislav Petkov authored and Greg Kroah-Hartman committed Jan 17, 2013
1 parent 1a5d76d commit f5e097f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/base/dma-buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit f5e097f

Please sign in to comment.