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:
parent
1a5d76dbe8
commit
f5e097f046
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue