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>
This commit is contained in:
Borislav Petkov 2012-12-11 16:05:26 +01:00 committed by Greg Kroah-Hartman
parent 1a5d76dbe8
commit f5e097f046

View 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);